explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YolR

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5,935.718 17,898.736 ↓ 0.0 0 1

Delete on audit_evs_all aea (cost=244.75..8,585.74 rows=300 width=38) (actual time=17,898.736..17,898.736 rows=0 loops=1)

2. 0.693 11,963.018 ↑ 1.0 300 1

Nested Loop (cost=244.75..8,585.74 rows=300 width=38) (actual time=95.268..11,963.018 rows=300 loops=1)

3. 0.501 11,530.325 ↑ 1.0 300 1

Subquery Scan on aea2 (cost=244.31..7,549.24 rows=300 width=40) (actual time=76.117..11,530.325 rows=300 loops=1)

4. 0.125 11,529.824 ↑ 1.0 300 1

Limit (cost=244.31..7,546.24 rows=300 width=8) (actual time=76.080..11,529.824 rows=300 loops=1)

5. 4.929 11,529.699 ↑ 436.1 300 1

Merge Right Join (cost=244.31..3,184,882.63 rows=130,841 width=8) (actual time=76.079..11,529.699 rows=300 loops=1)

  • Merge Cond: (evs.ev_id = aea_1.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: 8,742
6. 1.149 1.149 ↑ 3,959.4 148 1

Index Only Scan using index_676288 on evs (cost=0.42..37,071.74 rows=585,986 width=8) (actual time=0.010..1.149 rows=148 loops=1)

  • Heap Fetches: 92
7. 11,523.621 11,523.621 ↑ 1,689.2 9,042 1

Index Scan using idx_audit_evs_all_ei on audit_evs_all aea_1 (cost=0.56..2,956,738.02 rows=15,273,305 width=16) (actual time=76.062..11,523.621 rows=9,042 loops=1)

  • Filter: (when_created <= (now() - '14 days'::interval))
8. 432.000 432.000 ↑ 1.0 1 300

Index Scan using audit_evs_all_pk on audit_evs_all aea (cost=0.44..3.46 rows=1 width=14) (actual time=1.440..1.440 rows=1 loops=300)

  • Index Cond: (audit_ev_id = aea2.audit_ev_id)
Planning time : 6.248 ms
Execution time : 17,899.226 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
audit_evs_all_arc_tr 5,931.590 ms 300 19.772 ms