2020-04-08 14:22:25 +00:00
|
|
|
|
---
|
|
|
|
|
toc_priority: 31
|
2020-06-18 14:42:10 +00:00
|
|
|
|
toc_title: "延时引擎"
|
2020-04-08 14:22:25 +00:00
|
|
|
|
---
|
|
|
|
|
|
2020-06-13 02:47:23 +00:00
|
|
|
|
# 延时引擎Lazy {#lazy}
|
2020-04-08 14:22:25 +00:00
|
|
|
|
|
2020-06-13 02:47:23 +00:00
|
|
|
|
在距最近一次访问间隔`expiration_time_in_seconds`时间段内,将表保存在内存中,仅适用于 \*Log引擎表
|
2020-04-08 14:22:25 +00:00
|
|
|
|
|
2020-06-13 02:47:23 +00:00
|
|
|
|
由于针对这类表的访问间隔较长,对保存大量小的 \*Log引擎表进行了优化,
|
2020-04-08 14:22:25 +00:00
|
|
|
|
|
|
|
|
|
## 创建数据库 {#creating-a-database}
|
|
|
|
|
|
|
|
|
|
CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds);
|
|
|
|
|
|
|
|
|
|
[原始文章](https://clickhouse.tech/docs/en/database_engines/lazy/) <!--hide-->
|