explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mjn8

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 69,251.646 ↓ 0.0 0 1

Hash Left Join (cost=11,539.08..2,627,520.98 rows=446,608 width=16) (actual time=69,251.646..69,251.646 rows=0 loops=1)

  • Output: request_history.f_id
  • Hash Cond: (((request_history_to_delete.f_module)::text = (retention_config.f_module)::text) AND ((request_history_to_delete.f_function)::text = (retention_config.f_function)::text))
  • Filter: ((COALESCE(retention_config.f_retention_period, request_history_1.f_retention_period) <> '-1'::integer) AND ((1571729400 - COALESCE(retention_config.f_retention_period, request_history_1.f_retention_period)) > request_history.f_last_modified_long))
  • Buffers: shared hit=42,174 read=1,552,916 dirtied=1,156
2. 0.005 69,251.630 ↓ 0.0 0 1

Nested Loop (cost=11,537.65..2,595,437.70 rows=378,537 width=43) (actual time=69,251.630..69,251.630 rows=0 loops=1)

  • Output: request_history.f_id, request_history.f_last_modified_long, request_history_1.f_retention_period, request_history_to_delete.f_module, request_history_to_delete.f_function
  • Join Filter: (request_history_to_delete.f_id = request_history_1.f_id)
  • Buffers: shared hit=42,174 read=1,552,916 dirtied=1,156
3. 9,755.248 69,251.625 ↓ 0.0 0 1

Hash Join (cost=11,537.08..2,314,254.02 rows=378,537 width=55) (actual time=69,251.625..69,251.625 rows=0 loops=1)

  • Output: request_history.f_id, request_history.f_last_modified_long, request_history_to_delete.f_module, request_history_to_delete.f_function, request_history_to_delete.f_id
  • Hash Cond: (request_history.f_id = request_history_to_delete.f_id)
  • Buffers: shared hit=42,174 read=1,552,916 dirtied=1,156
4. 59,452.252 59,452.252 ↑ 1.0 49,291,930 1

Seq Scan on dpa.request_history (cost=0.00..2,106,150.32 rows=51,408,332 width=24) (actual time=7.993..59,452.252 rows=49,291,930 loops=1)

  • Output: request_history.f_id, request_history.f_agent_id, request_history.f_endtime, request_history.f_function, request_history.f_last_modified_long, request_history.f_message, request_history.f_module, request_history.f_report_size, request_history.f_retention_period, request_history.f_runid, request_history.f_run_type, request_history.f_starttime, request_history.f_status, request_history.f_target_id
  • Buffers: shared hit=39,151 read=1,552,916 dirtied=1,156
5. 16.086 44.125 ↑ 5.0 75,000 1

Hash (cost=6,805.37..6,805.37 rows=378,537 width=31) (actual time=44.125..44.125 rows=75,000 loops=1)

  • Output: request_history_to_delete.f_module, request_history_to_delete.f_function, request_history_to_delete.f_id
  • Buckets: 524,288 Batches: 1 Memory Usage: 8,763kB
  • Buffers: shared hit=3,020
6. 28.039 28.039 ↑ 5.0 75,000 1

Seq Scan on dpa.request_history_to_delete (cost=0.00..6,805.37 rows=378,537 width=31) (actual time=7.654..28.039 rows=75,000 loops=1)

  • Output: request_history_to_delete.f_module, request_history_to_delete.f_function, request_history_to_delete.f_id
  • Buffers: shared hit=3,020
7. 0.000 0.000 ↓ 0.0 0

Index Scan using request_history_pkey on dpa.request_history request_history_1 (cost=0.56..0.73 rows=1 width=20) (never executed)

  • Output: request_history_1.f_id, request_history_1.f_agent_id, request_history_1.f_endtime, request_history_1.f_function, request_history_1.f_last_modified_long, request_history_1.f_message, request_history_1.f_module, request_history_1.f_report_size, request_history_1.f_retention_period, request_history_1.f_runid, request_history_1.f_run_type, request_history_1.f_starttime, request_history_1.f_status, request_history_1.f_target_id
  • Index Cond: (request_history_1.f_id = request_history.f_id)
8. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.24..1.24 rows=13 width=21) (never executed)

  • Output: retention_config.f_module, retention_config.f_function, retention_config.f_retention_period
9. 0.000 0.000 ↓ 0.0 0

Seq Scan on dpa.retention_config (cost=0.00..1.24 rows=13 width=21) (never executed)

  • Output: retention_config.f_module, retention_config.f_function, retention_config.f_retention_period
  • Filter: ((retention_config.f_table_name)::text = 'backupevent'::text)