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

19 lines
1.3 KiB
Markdown
Raw Normal View History

2020-04-03 13:23:32 +00:00
---
sidebar_position: 110
sidebar_label: Memory
2020-04-03 13:23:32 +00:00
---
2022-06-02 10:55:18 +00:00
# Memory Table Engine
2017-04-03 19:49:50 +00:00
2017-04-26 17:26:17 +00:00
The Memory engine stores data in RAM, in uncompressed form. Data is stored in exactly the same form as it is received when read. In other words, reading from this table is completely free.
2021-05-27 19:44:11 +00:00
Concurrent data access is synchronized. Locks are short: read and write operations do not block each other.
2017-04-26 17:26:17 +00:00
Indexes are not supported. Reading is parallelized.
2020-06-10 20:08:20 +00:00
2017-04-26 17:26:17 +00:00
Maximal productivity (over 10 GB/sec) is reached on simple queries, because there is no reading from the disk, decompressing, or deserializing data. (We should note that in many cases, the productivity of the MergeTree engine is almost as high.)
When restarting a server, data disappears from the table and the table becomes empty.
Normally, using this table engine is not justified. However, it can be used for tests, and for tasks where maximum speed is required on a relatively small number of rows (up to approximately 100,000,000).
2017-04-03 19:49:50 +00:00
2020-06-10 20:08:20 +00:00
The Memory engine is used by the system for temporary tables with external query data (see the section “External data for processing a query”), and for implementing `GLOBAL IN` (see the section “IN operators”).
[Original article](https://clickhouse.com/docs/en/engines/table-engines/special/memory/) <!--hide-->