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
|
|
|
|
It’s 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
|
|
|
|
|
2020-03-21 04:11:51 +00:00
|
|
|
|
CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds);
|
2019-10-09 19:19:50 +00:00
|
|
|
|
|
2020-01-30 10:34:55 +00:00
|
|
|
|
[Original article](https://clickhouse.tech/docs/en/database_engines/lazy/) <!--hide-->
|