n_dead_tup
Dead row estimateDimensions:None
Interface Metrics (3)
Dimensions:None
Sources
Technical Annotations (54)
Configuration Parameters (7)
autovacuum_vacuum_scale_factorrecommended: 0.1autovacuum_analyze_scale_factorrecommended: 0.05autovacuum_max_workersrecommended: 4autovacuum_naptimerecommended: 30sautovacuum_vacuum_cost_delayrecommended: 2autovacuum_vacuum_thresholdrecommended: 50autovacuum_vacuum_cost_limitCLI Commands (23)
VACUUM ANALYZE table_name;remediationSELECT schemaname, relname AS table_name, n_live_tup AS live_tuples, n_dead_tup AS dead_tuples, ROUND(n_dead_tup::numeric / NULLIF(n_live_tup, 0) * 100, 2) AS dead_pct, last_autovacuum, last_autoanalyze, autovacuum_count, autoanalyze_count FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 20;diagnosticALTER TABLE events SET (autovacuum_vacuum_threshold = 1000, autovacuum_vacuum_scale_factor = 0.005, autovacuum_analyze_threshold = 500, autovacuum_analyze_scale_factor = 0.005, autovacuum_vacuum_cost_delay = 0, autovacuum_vacuum_cost_limit = 3000);remediationSELECT * FROM pg_replication_slots;diagnosticSELECT pg_drop_replication_slot(slot_name);remediationSELECT relname, n_live_tup, n_dead_tup, pg_size_pretty(pg_total_relation_size(oid)) FROM pg_stat_user_tables WHERE schemaname = 'public';diagnosticVACUUM FULL table_name;remediationVACUUMremediationANALYZEremediationSELECT schemaname, relname, n_dead_tup, n_live_tup, ROUND((n_dead_tup::float / NULLIF(n_live_tup + n_dead_tup, 0)) * 100, 2) AS dead_tuple_percent, last_autovacuum, autovacuum_count FROM pg_stat_user_tables WHERE n_dead_tup > 1000 ORDER BY n_dead_tup DESC;diagnosticVACUUM FULLremediationCLUSTERremediationTRUNCATEremediationSELECT schemaname, relname AS table_name, n_dead_tup AS dead_tuples, n_live_tup AS live_tuples, last_autovacuum, last_autoanalyze, CASE WHEN n_live_tup > 0 THEN round(100.0 * n_dead_tup / n_live_tup, 1) ELSE 0 END AS dead_tuple_ratio FROM pg_stat_user_tables WHERE n_dead_tup > 500 ORDER BY n_dead_tup DESC LIMIT 15;diagnosticALTER TABLE sim_events SET (autovacuum_vacuum_scale_factor = 0.02, autovacuum_vacuum_threshold = 500, autovacuum_vacuum_cost_delay = 2, autovacuum_vacuum_cost_limit = 1000);remediationSELECT relname, reloptions FROM pg_class WHERE relname = 'sim_events';diagnosticSELECT relname, reloptions FROM pg_class WHERE reloptions IS NOT NULL AND relkind = 'r';diagnosticgcloud sql instances patch MY_INSTANCE --database-flags=autovacuum_max_workers=6,autovacuum_vacuum_scale_factor=0.02,autovacuum_analyze_scale_factor=0.01,autovacuum_vacuum_cost_limit=2000,autovacuum_vacuum_cost_delay=0,autovacuum_naptime=15remediationSELECT relname AS table, n_dead_tup AS dead_rows FROM pg_stat_user_tables ORDER BY n_dead_tup DESC LIMIT 10;diagnosticALTER TABLE your_table SET (autovacuum_vacuum_threshold = 1000, autovacuum_vacuum_scale_factor = 0.05);remediationVACUUM (VERBOSE, ANALYZE)remediationSELECT name, setting FROM pg_settings WHERE name LIKE 'autovacuum%';diagnosticVACUUM ANALYZE your_table_name;remediationTechnical References (24)
autovacuumcomponentdead tuplesconceptMVCCconceptbloatconceptpg_repackcomponentpg_stat_user_tablescomponentpgwatchcomponentVACUUMcomponentcatalog_xminconceptWAL (Write-Ahead Log)componentreplication slotcomponentAutovacuumcomponentVACUUM FULLcomponentn_dead_tupcomponentpg_stat_user_tables_n_dead_tupcomponenttable bloatconceptHOT updatesconceptXID wraparoundconceptpg_classcomponentPostgreSQL server logscomponentCloud SQL database flagscomponentautovacuum_vacuum_thresholdcomponentautovacuum_vacuum_scale_factorcomponenttransaction ID wraparoundconceptRelated Insights (22)
Table bloat from dead tuples degrades performance and wastes disk spacewarning
▸
High dead tuple ratio causes table bloat and slow querieswarning
▸
High dead tuple percentage causes query degradation and cache inefficiencywarning
▸
Index and table bloat wastes disk space and degrades query performancewarning
▸
Autovacuum falling behind on tables causes bloat accumulationwarning
▸
Inactive replication slots prevent autovacuum from removing dead tuples cluster-widecritical
▸
High-volume write workload causes I/O saturation when autovacuum runswarning
▸
Dead tuples accumulate massively when autovacuum is blocked from cleanupcritical
▸
Bloated tables with dead rows skew performance metrics and waste storagewarning
▸
Inefficient autovacuum process delays storage reclamationwarning
▸
Dead tuple accumulation causes table bloat and performance degradationwarning
▸
High dead tuple count triggers vacuum alertwarning
▸
Large tables miss autovacuum due to scale factor defaultswarning
▸
Table bloat from insufficient vacuuming requires VACUUM FULLwarning
▸
Autovacuum triggers too late on large tables causing bloat and query degradationwarning
▸
Autovacuum disabled on individual tables causes uncontrolled bloatcritical
▸
Vacuum duration increasing over time signals bloat accumulation between runswarning
▸
Autovacuum falls behind on high-write tables due to conservative defaultswarning
▸
Dead tuples exceed threshold causing table and index bloatwarning
▸
Default autovacuum thresholds insufficient for high-churn tableswarning
▸
High-churn table with millions of updates shows degraded SELECT performancecritical
▸
High autovacuum duration causes table bloat and performance degradationwarning
▸