explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1liU

Settings
# exclusive inclusive rows x rows loops node
1. 20.591 1,244.911 ↑ 1.6 18,652 1

HashAggregate (cost=1,005,030.45..1,005,326.99 rows=29,654 width=8) (actual time=1,240.907..1,244.911 rows=18,652 loops=1)

  • Group Key: aea.audit_ev_id
2. 2.567 1,224.320 ↓ 1.1 33,034 1

Append (cost=44,887.03..1,004,956.32 rows=29,654 width=8) (actual time=446.106..1,224.320 rows=33,034 loops=1)

3. 372.278 1,195.563 ↓ 1.3 18,652 1

Hash Left Join (cost=44,887.03..983,043.78 rows=14,827 width=8) (actual time=446.105..1,195.563 rows=18,652 loops=1)

  • Hash Cond: (aea.ev_id = evs.ev_id)
  • Filter: (((aea.ev_id IS NOT NULL) AND (evs.ev_id IS NULL)) OR (aea.ev_id IS NULL))
  • Rows Removed by Filter: 1389834
4. 398.459 486.914 ↓ 1.0 1,408,486 1

Bitmap Heap Scan on audit_evs_all aea (cost=16,229.63..950,749.01 rows=1,385,659 width=16) (actual time=99.452..486.914 rows=1,408,486 loops=1)

  • Recheck Cond: (((when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone) AND (ev_id IS NOT NULL)) OR ((when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone) AND (ev_id IS NULL)))
  • Heap Blocks: exact=53887
5. 0.004 88.455 ↓ 0.0 0 1

BitmapOr (cost=16,229.63..16,229.63 rows=1,385,659 width=0) (actual time=88.455..88.455 rows=0 loops=1)

6. 87.029 87.029 ↓ 1.0 1,394,104 1

Bitmap Index Scan on idx_audit_evs_all_when_created (cost=0.00..15,369.68 rows=1,370,832 width=0) (actual time=87.029..87.029 rows=1,394,104 loops=1)

  • Index Cond: (when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone)
7. 1.422 1.422 ↑ 1.0 14,382 1

Bitmap Index Scan on idx_audit_evs_all_when_created_null (cost=0.00..167.12 rows=14,827 width=0) (actual time=1.422..1.422 rows=14,382 loops=1)

  • Index Cond: (when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone)
8. 168.715 336.371 ↑ 1.1 589,942 1

Hash (cost=20,626.48..20,626.48 rows=642,473 width=8) (actual time=336.371..336.371 rows=589,942 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 31237kB
9. 167.656 167.656 ↑ 1.1 589,942 1

Index Only Scan using evs_pk on evs (cost=0.42..20,626.48 rows=642,473 width=8) (actual time=0.041..167.656 rows=589,942 loops=1)

  • Heap Fetches: 106695
10. 23.607 26.190 ↑ 1.0 14,382 1

Bitmap Heap Scan on audit_evs_all aea_1 (cost=170.83..21,615.99 rows=14,827 width=8) (actual time=4.196..26.190 rows=14,382 loops=1)

  • Recheck Cond: ((when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone) AND (ev_id IS NULL))
  • Heap Blocks: exact=11400
11. 2.583 2.583 ↑ 1.0 14,382 1

Bitmap Index Scan on idx_audit_evs_all_when_created_null (cost=0.00..167.12 rows=14,827 width=0) (actual time=2.583..2.583 rows=14,382 loops=1)

  • Index Cond: (when_created <= '2019-06-15 09:53:28.924+00'::timestamp with time zone)
Planning time : 14.154 ms
Execution time : 1,246.391 ms