explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cjik

Settings
# exclusive inclusive rows x rows loops node
1. 311.590 1,143.459 ↑ 1.1 626,635 1

Hash Right Join (cost=2,204.15..40,944.78 rows=666,866 width=4) (actual time=24.111..1,143.459 rows=626,635 loops=1)

  • Hash Cond: (rtpezoav.zo_id = z.id)
2. 92.950 807.778 ↓ 1.1 626,635 1

Append (cost=0.00..29,873.07 rows=586,373 width=4) (actual time=0.011..807.778 rows=626,635 loops=1)

3. 14.664 14.664 ↑ 1.0 38,143 1

Seq Scan on rtpezoav (cost=0.00..900.82 rows=38,143 width=4) (actual time=0.010..14.664 rows=38,143 loops=1)

  • Filter: (ad_id = ANY ('{{1048,1051,1052,1071,NULL}}'::integer[]))
4. 120.193 700.164 ↓ 1.1 588,492 1

Subquery Scan on *SELECT* 2_1 (cost=2,707.54..26,040.38 rows=548,230 width=4) (actual time=55.250..700.164 rows=588,492 loops=1)

5. 318.728 579.971 ↓ 1.1 588,492 1

Hash Anti Join (cost=2,707.54..20,558.08 rows=548,230 width=56) (actual time=55.249..579.971 rows=588,492 loops=1)

  • Hash Cond: ((rtpe.id = av_1.pe_id) AND (av.zo_id = av_1.zo_id) AND (av.ad_id = av_1.ad_id))
6. 206.051 232.230 ↑ 1.0 588,492 1

Hash Join (cost=1,377.61..8,057.95 rows=588,840 width=12) (actual time=26.196..232.230 rows=588,492 loops=1)

  • Hash Cond: (rtpe.baseline_id = av.pe_id)
7. 0.057 0.057 ↑ 1.0 29 1

Seq Scan on rtpe (cost=0.00..1.29 rows=29 width=8) (actual time=0.010..0.057 rows=29 loops=1)

8. 12.417 26.122 ↑ 1.0 38,143 1

Hash (cost=900.82..900.82 rows=38,143 width=12) (actual time=26.121..26.122 rows=38,143 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2151kB
9. 13.705 13.705 ↑ 1.0 38,143 1

Seq Scan on rtpezoav av (cost=0.00..900.82 rows=38,143 width=12) (actual time=0.014..13.705 rows=38,143 loops=1)

  • Filter: (ad_id = ANY ('{{1048,1051,1052,1071,NULL}}'::integer[]))
10. 18.377 29.013 ↑ 1.0 38,143 1

Hash (cost=662.43..662.43 rows=38,143 width=12) (actual time=29.013..29.013 rows=38,143 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2151kB
11. 10.636 10.636 ↑ 1.0 38,143 1

Seq Scan on rtpezoav av_1 (cost=0.00..662.43 rows=38,143 width=12) (actual time=0.013..10.636 rows=38,143 loops=1)

12. 1.858 24.091 ↑ 1.1 5,449 1

Hash (cost=2,126.68..2,126.68 rows=6,197 width=4) (actual time=24.091..24.091 rows=5,449 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 256kB
13. 2.343 22.233 ↑ 1.1 5,449 1

Hash Join (cost=918.80..2,126.68 rows=6,197 width=4) (actual time=13.371..22.233 rows=5,449 loops=1)

  • Hash Cond: (z.re_id = re.id)
14. 3.473 19.862 ↑ 1.1 5,449 1

Hash Right Join (cost=917.47..2,104.49 rows=6,197 width=8) (actual time=13.338..19.862 rows=5,449 loops=1)

  • Hash Cond: ((rtsepezoav.pe_id = inh.pe_id) AND (rtsepezoav.zo_id = z.id))
15. 0.739 4.420 ↑ 1.0 5,449 1

Append (cost=0.00..1,084.17 rows=5,450 width=8) (actual time=1.360..4.420 rows=5,449 loops=1)

16. 3.649 3.649 ↑ 1.0 5,449 1

Seq Scan on rtsepezoav (cost=0.00..271.50 rows=5,449 width=8) (actual time=1.359..3.649 rows=5,449 loops=1)

  • Filter: ((ad_id = ANY ('{{21,NULL}}'::integer[])) AND (pe_id = 3) AND (se_id = 3041))
  • Rows Removed by Filter: 5437
17. 0.001 0.032 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=354.64..785.42 rows=1 width=8) (actual time=0.032..0.032 rows=0 loops=1)

18. 0.000 0.031 ↓ 0.0 0 1

Hash Anti Join (cost=354.64..785.41 rows=1 width=60) (actual time=0.031..0.031 rows=0 loops=1)

  • Hash Cond: ((rtpe_1.id = av_1_1.pe_id) AND (av_2.se_id = av_1_1.se_id) AND (av_2.zo_id = av_1_1.zo_id) AND (av_2.ad_id = av_1_1.ad_id))
19. 0.006 0.031 ↓ 0.0 0 1

Hash Join (cost=1.38..330.68 rows=5,073 width=16) (actual time=0.031..0.031 rows=0 loops=1)

  • Hash Cond: (av_2.pe_id = rtpe_1.baseline_id)
20. 0.013 0.013 ↑ 10,886.0 1 1

Seq Scan on rtsepezoav av_2 (cost=0.00..244.29 rows=10,886 width=16) (actual time=0.013..0.013 rows=1 loops=1)

  • Filter: ((ad_id = ANY ('{{21,NULL}}'::integer[])) AND (se_id = 3041))
21. 0.001 0.012 ↓ 0.0 0 1

Hash (cost=1.36..1.36 rows=1 width=8) (actual time=0.012..0.012 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
22. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on rtpe rtpe_1 (cost=0.00..1.36 rows=1 width=8) (actual time=0.009..0.011 rows=1 loops=1)

  • Filter: (id = 3)
  • Rows Removed by Filter: 28
23. 0.000 0.000 ↓ 0.0 0

Hash (cost=244.29..244.29 rows=5,449 width=16) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Seq Scan on rtsepezoav av_1_1 (cost=0.00..244.29 rows=5,449 width=16) (never executed)

  • Filter: ((pe_id = 3) AND (se_id = 3041))
25. 2.263 11.969 ↑ 1.1 5,449 1

Hash (cost=824.53..824.53 rows=6,196 width=12) (actual time=11.969..11.969 rows=5,449 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 299kB
26. 2.802 9.706 ↑ 1.1 5,449 1

Hash Join (cost=364.71..824.53 rows=6,196 width=12) (actual time=4.443..9.706 rows=5,449 loops=1)

  • Hash Cond: (inh.zo_id = z.id)
27. 2.495 3.606 ↑ 1.1 5,449 1

Bitmap Heap Scan on rtpezoav inh (cost=207.11..650.65 rows=6,196 width=8) (actual time=1.136..3.606 rows=5,449 loops=1)

  • Recheck Cond: (ad_id = 1051)
  • Filter: (pe_id = 3)
  • Rows Removed by Filter: 5449
  • Heap Blocks: exact=84
28. 1.111 1.111 ↓ 1.0 10,898 1

Bitmap Index Scan on rtpezoav_ad_id_zo_id_idx (cost=0.00..205.56 rows=10,836 width=0) (actual time=1.111..1.111 rows=10,898 loops=1)

  • Index Cond: (ad_id = 1051)
29. 1.837 3.298 ↑ 1.0 5,449 1

Hash (cost=89.49..89.49 rows=5,449 width=8) (actual time=3.297..3.298 rows=5,449 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 277kB
30. 1.461 1.461 ↑ 1.0 5,449 1

Seq Scan on rtzo z (cost=0.00..89.49 rows=5,449 width=8) (actual time=0.012..1.461 rows=5,449 loops=1)

31. 0.007 0.028 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=4) (actual time=0.028..0.028 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
32. 0.021 0.021 ↑ 1.0 15 1

Seq Scan on rtre re (cost=0.00..1.15 rows=15 width=4) (actual time=0.017..0.021 rows=15 loops=1)

Planning time : 2.933 ms
Execution time : 1,193.679 ms