原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/sql-index-frozen.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/sql-index-frozen.html
本地英文版地址: ../en/sql-index-frozen.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Frozen Indicesedit
Elasticsearch frozen indices are a useful and powerful tool for hot/warm architecture introduced in Elasticsearch 6.6, essentially by trading speed for memory. Elasticsearch SQL supports frozen indices and similar to Elasticsearch, due to their performance characteristics, allows searches on them only when explicitly told so by user - in other words, by default, frozen indices are not included in searches.
One can toggle the use of frozen indices through:
- dedicated configuration parameter
-
Set to
true
propertiesindex_include_frozen
in the SQL REST API orindex.include.frozen
in the drivers to include frozen indices. - dedicated keyword
-
Explicitly perform the inclusion through the dedicated
FROZEN
keyword in theFROM
clause orINCLUDE FROZEN
in theSHOW
commands:
SHOW TABLES INCLUDE FROZEN; name | type | kind ---------------+---------------+--------------- archive |BASE TABLE |FROZEN INDEX emp |BASE TABLE |INDEX employees |VIEW |ALIAS library |BASE TABLE |INDEX
SELECT * FROM FROZEN archive LIMIT 1; author | name | page_count | release_date -----------------+--------------------+---------------+-------------------- James S.A. Corey |Leviathan Wakes |561 |2011-06-02T00:00:00Z
Unless enabled, frozen indices are completely ignored; it is as if they do not exist and as such, queries ran against them are likely to fail.