Skip to main content
VeloDB Cloud 26.x is based on Apache Doris 4.x. See Version Mapping.

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 nameTypeDescription
BE_IDbigintBackend compute node ID.
BE_IPstringBackend address.
CACHE_PATHstringCache path identifier on the backend.
METRIC_NAMEstringCache metric name.
METRIC_VALUEstringMetric 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.

MetricMeaning
normal_queue_curr_elementsNumber of cached file blocks in the normal queue.
normal_queue_max_elementsMaximum file block count for the normal queue.
normal_queue_curr_sizeCurrent size of the normal queue, in bytes.
normal_queue_max_sizeMaximum size of the normal queue, in bytes.
hits_ratioCache hit ratio since the backend started.
hits_ratio_5mCache hit ratio over the last 5 minutes.
hits_ratio_1hCache 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;