file_cache_statistics
Inspect file cache metrics reported by backend compute nodes in the cluster used by the query.
Run the query in the warehouse SQL Editor or a connected SQL client:
SELECT * FROM information_schema.file_cache_statistics LIMIT 10;
Database
information_schema
Table information
| Column name | Type | Description |
|---|---|---|
BE_ID | bigint | Backend compute node ID. |
BE_IP | string | Backend address. |
CACHE_PATH | string | Cache path identifier on the backend. |
METRIC_NAME | string | Cache metric name. |
METRIC_VALUE | string | Metric value represented as text. |
Use DESCRIBE information_schema.file_cache_statistics; to inspect the schema in your warehouse.
Common metrics
Metric names depend on the cache implementation. The following metrics are examples, not an exhaustive list.
| Metric | Meaning |
|---|---|
normal_queue_curr_elements | Number of cached file blocks in the normal queue. |
normal_queue_max_elements | Maximum file block count for the normal queue. |
normal_queue_curr_size | Current size of the normal queue, in bytes. |
normal_queue_max_size | Maximum size of the normal queue, in bytes. |
hits_ratio | Cache hit ratio since the backend started. |
hits_ratio_5m | Cache hit ratio over the last 5 minutes. |
hits_ratio_1h | Cache hit ratio over the last hour. |
Compare cache hit ratios
Cast the text value to a number before sorting:
SELECT BE_ID, CAST(METRIC_VALUE AS DOUBLE) AS hit_ratio
FROM information_schema.file_cache_statistics
WHERE METRIC_NAME = 'hits_ratio'
ORDER BY hit_ratio;