explain.depesz.com

PostgreSQL's explain analyze made readable

Result: n6RJ : Optimization for: plan #4NSv

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 6,716.338 119,247.501 ↓ 0.0 0 1

Delete on audit_evs_all_arc todel (cost=1,185,498.72..3,146,748.96 rows=1,541,561 width=12) (actual time=119,247.501..119,247.501 rows=0 loops=1)

2. 17,152.681 112,531.163 ↑ 1.0 1,494,705 1

Hash Join (cost=1,185,498.72..3,146,748.96 rows=1,541,561 width=12) (actual time=12,673.198..112,531.163 rows=1,494,705 loops=1)

  • Hash Cond: (todel.audit_ev_id = audit_evs_all_arc.audit_ev_id)
3. 82,716.861 82,716.861 ↓ 1.0 33,027,536 1

Seq Scan on audit_evs_all_arc todel (cost=0.00..1,875,447.92 rows=32,686,592 width=14) (actual time=0.028..82,716.861 rows=33,027,536 loops=1)

4. 730.294 12,661.621 ↑ 1.0 1,494,705 1

Hash (cost=1,166,229.21..1,166,229.21 rows=1,541,561 width=14) (actual time=12,661.621..12,661.621 rows=1,494,705 loops=1)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 86,449kB
5. 11,619.642 11,931.327 ↑ 1.0 1,494,705 1

Bitmap Heap Scan on audit_evs_all_arc (cost=22,623.62..1,166,229.21 rows=1,541,561 width=14) (actual time=321.706..11,931.327 rows=1,494,705 loops=1)

  • Recheck Cond: ((when_created <= '2020-07-15 02:30:22.661+00'::timestamp with time zone) OR (when_created IS NULL))
  • Heap Blocks: exact=55,698
6. 0.003 311.685 ↓ 0.0 0 1

BitmapOr (cost=22,623.62..22,623.62 rows=1,541,561 width=0) (actual time=311.685..311.685 rows=0 loops=1)

7. 311.649 311.649 ↑ 1.0 1,494,705 1

Bitmap Index Scan on idx_audit_evs_arc_wc (cost=0.00..21,850.77 rows=1,541,561 width=0) (actual time=311.649..311.649 rows=1,494,705 loops=1)

  • Index Cond: (when_created <= '2020-07-15 02:30:22.661+00'::timestamp with time zone)
8. 0.033 0.033 ↓ 0.0 0 1

Bitmap Index Scan on idx_audit_evs_arc_wc (cost=0.00..2.07 rows=1 width=0) (actual time=0.033..0.033 rows=0 loops=1)

  • Index Cond: (when_created IS NULL)
Planning time : 0.503 ms
Execution time : 119,251.879 ms