explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FrV3 : Optimization for: Optimization for: plan #g3ZrB; plan #Q7Oa

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.697 322.472 ↓ 0.0 0 1

Delete on audit_evs_all aea (cost=6,808.09..177,439.35 rows=300 width=38) (actual time=322.468..322.472 rows=0 loops=1)

2. 0.331 320.775 ↑ 1.0 300 1

Nested Loop (cost=6,808.09..177,439.35 rows=300 width=38) (actual time=156.134..320.775 rows=300 loops=1)

3. 0.174 168.644 ↑ 1.0 300 1

Subquery Scan on aea2 (cost=6,807.66..176,405.10 rows=300 width=40) (actual time=105.881..168.644 rows=300 loops=1)

4. 0.046 168.470 ↑ 1.0 300 1

Limit (cost=6,807.66..176,402.10 rows=300 width=8) (actual time=105.836..168.470 rows=300 loops=1)

5. 3.090 168.424 ↑ 3.5 300 1

Hash Left Join (cost=6,807.66..607,171.99 rows=1,062 width=8) (actual time=105.834..168.424 rows=300 loops=1)

  • Hash Cond: (aea_1.ev_id = evs.ev_id)
  • Filter: (((aea_1.ev_id IS NOT NULL) AND (evs.ev_id IS NULL)) OR (aea_1.ev_id IS NULL))
  • Rows Removed by Filter: 3,079
6. 105.927 105.927 ↑ 481.5 7,348 1

Seq Scan on audit_evs_all aea_1 (cost=0.00..556,102.84 rows=3,538,335 width=16) (actual time=44.172..105.927 rows=7,348 loops=1)

  • Filter: (when_created <= '2020-08-09 19:15:21.635+00'::timestamp with time zone)
  • Rows Removed by Filter: 14
7. 23.917 59.407 ↑ 1.0 105,596 1

Hash (cost=5,059.18..5,059.18 rows=106,518 width=8) (actual time=59.406..59.407 rows=105,596 loops=1)

  • Buckets: 131,072 Batches: 2 Memory Usage: 3,100kB
8. 35.490 35.490 ↑ 1.0 105,596 1

Seq Scan on evs (cost=0.00..5,059.18 rows=106,518 width=8) (actual time=0.024..35.490 rows=105,596 loops=1)

9. 151.800 151.800 ↑ 1.0 1 300

Index Scan using audit_evs_all_pk on audit_evs_all aea (cost=0.43..3.45 rows=1 width=14) (actual time=0.506..0.506 rows=1 loops=300)

  • Index Cond: (audit_ev_id = aea2.audit_ev_id)
Planning time : 1,830.791 ms
Execution time : 4,077.689 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
audit_evs_all_arc_tr 3,753.791 ms 300 12.513 ms