ClickHouse/docs/en/engines/database-engines/lazy.md

17 lines
495 B
Markdown
Raw Normal View History

2020-04-03 13:23:32 +00:00
---
2022-04-03 23:05:35 +00:00
toc_priority: 31
toc_title: Lazy
2020-04-03 13:23:32 +00:00
---
2020-03-20 10:10:48 +00:00
# Lazy {#lazy}
2019-10-08 08:31:12 +00:00
2020-02-03 15:12:03 +00:00
Keeps tables in RAM only `expiration_time_in_seconds` seconds after last access. Can be used only with \*Log tables.
2019-10-08 08:31:12 +00:00
2020-03-20 10:10:48 +00:00
Its optimized for storing many small \*Log tables, for which there is a long time interval between accesses.
2019-10-08 08:31:12 +00:00
2020-03-20 10:10:48 +00:00
## Creating a Database {#creating-a-database}
2019-10-08 08:31:12 +00:00
CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds);
2019-10-09 19:19:50 +00:00
[Original article](https://clickhouse.com/docs/en/database_engines/lazy/) <!--hide-->