ClickHouse/docs/en/engines/table-engines/special/set.md

18 lines
948 B
Markdown
Raw Normal View History

2020-04-03 13:23:32 +00:00
---
toc_priority: 39
toc_title: Set
---
2020-03-20 10:10:48 +00:00
# Set {#set}
2017-04-03 19:49:50 +00:00
2020-03-20 10:10:48 +00:00
A data set that is always in RAM. It is intended for use on the right side of the IN operator (see the section “IN operators”).
2017-04-03 19:49:50 +00:00
2017-04-26 17:26:17 +00:00
You can use INSERT to insert data in the table. New elements will be added to the data set, while duplicates will be ignored.
2020-03-20 10:10:48 +00:00
But you cant perform SELECT from the table. The only way to retrieve data is by using it in the right half of the IN operator.
2017-04-03 19:49:50 +00:00
2017-04-26 17:26:17 +00:00
Data is always located in RAM. For INSERT, the blocks of inserted data are also written to the directory of tables on the disk. When starting the server, this data is loaded to RAM. In other words, after restarting, the data remains in place.
2017-04-03 19:49:50 +00:00
2017-04-26 17:26:17 +00:00
For a rough server restart, the block of data on the disk might be lost or damaged. In the latter case, you may need to manually delete the file with damaged data.
2020-01-30 10:34:55 +00:00
[Original article](https://clickhouse.tech/docs/en/operations/table_engines/set/) <!--hide-->