2020-04-03 13:23:32 +00:00
|
|
|
|
---
|
2022-08-28 14:53:34 +00:00
|
|
|
|
slug: /en/engines/database-engines/lazy
|
2022-04-09 13:29:05 +00:00
|
|
|
|
sidebar_label: Lazy
|
|
|
|
|
sidebar_position: 20
|
2020-04-03 13:23:32 +00:00
|
|
|
|
---
|
|
|
|
|
|
2022-06-02 10:55:18 +00:00
|
|
|
|
# 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);
|