Skip to main content
Edit this page

query_cache

クエリキャッシュの内容を表示します。

カラム:

  • query (String) — クエリ文字列。
  • result_size (UInt64) — クエリキャッシュエントリのサイズ。
  • tag (LowCardinality(String)) — クエリキャッシュエントリのタグ。
  • stale (UInt8) — クエリキャッシュエントリが古いかどうか。
  • shared (UInt8) — クエリキャッシュエントリが複数ユーザー間で共有されているかどうか。
  • compressed (UInt8) — クエリキャッシュエントリが圧縮されているかどうか。
  • expires_at (DateTime) — クエリキャッシュエントリが古くなる時刻。
  • key_hash (UInt64) — クエリ文字列のハッシュで、クエリキャッシュエントリを見つけるためのキーとして使用される。

SELECT * FROM system.query_cache FORMAT Vertical;
Row 1:
──────
query: SELECT 1 SETTINGS use_query_cache = 1
result_size: 128
tag:
stale: 0
shared: 0
compressed: 1
expires_at: 2023-10-13 13:35:45
key_hash: 12188185624808016954

1 row in set. Elapsed: 0.004 sec.