postgresql.blocks_read
Disk blocks readDimensions:None
Interface Metrics (4)
Dimensions:None
Sources
Technical Annotations (20)
Configuration Parameters (2)
shared_buffersrecommended: 25% of total RAMeffective_cache_sizerecommended: 50-75% of total RAMCLI Commands (7)
EXPLAIN (ANALYZE, BUFFERS) SELECT ... WHERE x = ? ORDER BY y LIMIT n;diagnosticCREATE INDEX ON table(filter_column, order_column);remediationSELECT sum(blks_hit) * 100.0 / sum(blks_hit + blks_read) as buffer_hit_ratio FROM pg_stat_database;diagnosticSELECT 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;diagnosticSELECT pg_reload_conf();remediationSELECT round(blks_hit*100/(blks_hit+blks_read), 2) AS cache_hit_ratio FROM pg_stat_database WHERE datname = current_database();diagnosticALTER SYSTEM SET shared_buffers = '16GB';remediationTechnical References (11)
multi-column indexconceptIndex Scan Backwardconceptcardinalityconceptshared_bufferscomponentpg_stat_databasecomponentpg_statio_user_tablescomponentOS Page CachecomponentCache Hit Ratioconceptshared bufferscomponentpg_buffercachecomponentcache hit ratioconceptRelated 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
▸