Technologies/PostgreSQL/postgresql.blocks_read
PostgreSQLPostgreSQLMetric

postgresql.blocks_read

Disk blocks read
Dimensions:None
Available on:DatadogDatadog (1)Native (1)OpenTelemetryOpenTelemetry (1)PrometheusPrometheus (1)
Interface Metrics (4)
DatadogDatadog
Total number of shared blocks read per query_signature, db, and user. (DBM only)
Dimensions:None
Native
Number of disk blocks read
Dimensions:None
OpenTelemetryOpenTelemetry
The number of blocks read.
Dimensions:None
PrometheusPrometheus
Number of disk blocks read in this database
Dimensions:None

Technical Annotations (20)

Configuration Parameters (2)
shared_buffersrecommended: 25% of total RAM
primary buffer cache, recommended 4GB for 16GB server, 16GB for 64GB server
effective_cache_sizerecommended: 50-75% of total RAM
planner estimate of OS and PostgreSQL cache
CLI Commands (7)
EXPLAIN (ANALYZE, BUFFERS) SELECT ... WHERE x = ? ORDER BY y LIMIT n;diagnostic
CREATE INDEX ON table(filter_column, order_column);remediation
SELECT sum(blks_hit) * 100.0 / sum(blks_hit + blks_read) as buffer_hit_ratio FROM pg_stat_database;diagnostic
SELECT relname, heap_blks_hit * 100.0 / nullif(heap_blks_hit + heap_blks_read, 0) as hit_ratio FROM pg_statio_user_tables WHERE heap_blks_read > 0 ORDER BY hit_ratio;diagnostic
SELECT pg_reload_conf();remediation
SELECT round(blks_hit*100/(blks_hit+blks_read), 2) AS cache_hit_ratio FROM pg_stat_database WHERE datname = current_database();diagnostic
ALTER SYSTEM SET shared_buffers = '16GB';remediation
Technical References (11)
multi-column indexconceptIndex Scan Backwardconceptcardinalityconceptshared_bufferscomponentpg_stat_databasecomponentpg_statio_user_tablescomponentOS Page CachecomponentCache Hit Ratioconceptshared bufferscomponentpg_buffercachecomponentcache hit ratioconcept
Related Insights (7)
Inefficient sort-then-limit requires fetching all rows before sortingwarning
Low buffer hit ratio indicates insufficient shared_buffers or cache pressurewarning
Insufficient shared_buffers causes excessive disk reads and slow querieswarning
Cache hit ratio below 99% indicates undersized shared_buffers or high disk I/Owarning
Insufficient shared_buffers causes excessive disk I/Owarning
Sequential scans load entire table into shared buffers memory areainfo
Cache hit ratio below 99% indicates insufficient shared_buffers memorywarning