> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> クエリキャッシュの内容を表示するシステムテーブル。

# system.query_cache

<Info>
  **ClickHouse Cloud でのクエリ**

  このシステムテーブルのデータは、ClickHouse Cloud の各ノードにローカルに保持されています。したがって、すべてのデータを完全に把握するには、`clusterAllReplicas` 関数を使用する必要があります。詳細については、[こちら](/ja/reference/system-tables/overview#system-tables-in-clickhouse-cloud)を参照してください。
</Info>

<div id="description">
  ## 説明
</div>

[クエリキャッシュ](/ja/concepts/features/performance/caches/query-cache) の内容を表示します。

<div id="columns">
  ## カラム
</div>

* `query` ([String](/ja/reference/data-types)) — クエリ文字列。
* `query_id` ([String](/ja/reference/data-types)) — クエリの ID。
* `result_size` ([UInt64](/ja/reference/data-types)) — クエリキャッシュのエントリのサイズ。
* `tag` ([LowCardinality(String)](/ja/reference/data-types)) — クエリキャッシュのエントリのタグ。
* `stale` ([UInt8](/ja/reference/data-types)) — クエリキャッシュのエントリが古くなっているかどうか。
* `shared` ([UInt8](/ja/reference/data-types)) — クエリキャッシュのエントリが複数のユーザー間で共有されているかどうか。
* `compressed` ([UInt8](/ja/reference/data-types)) — クエリキャッシュのエントリが圧縮されているかどうか。
* `expires_at` ([DateTime](/ja/reference/data-types)) — クエリキャッシュのエントリが古くなる日時。
* `key_hash` ([UInt64](/ja/reference/data-types)) — クエリ文字列のハッシュ。クエリキャッシュのエントリを見つけるためのキーとして使用されます。

<div id="example">
  ## 例
</div>

```sql theme={null}
SELECT * FROM system.query_cache FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
query:       SELECT 1 SETTINGS use_query_cache = 1
query_id:    7c28bbbb-753b-4eba-98b1-efcbe2b9bdf6
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.
```
