explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZZgH : legs

Settings
# exclusive inclusive rows x rows loops node
1. 253.545 2,476.868 ↑ 56.8 515,642 1

Merge Right Join (cost=102,002.800..541,600.600 rows=29,270,113 width=184) (actual time=2,132.324..2,476.868 rows=515,642 loops=1)

  • Merge Cond: (golf_delta.romeo_hotel = juliet_xray.romeo_hotel)
2.          

CTE whiskey

3. 121.078 1,403.922 ↓ 1.5 181,594 1

Hash Left Join (cost=26,448.290..49,654.760 rows=124,089 width=86) (actual time=1,236.868..1,403.922 rows=181,594 loops=1)

  • Hash Cond: ((seven_uniform.uniform_india)::text = (echo.victor_delta)::text)
4.          

Initplan (for Hash Left Join)

5. 0.894 0.894 ↑ 1,000.0 1 1

Function Scan on xray (cost=0.250..10.250 rows=1,000 width=4) (actual time=0.893..0.894 rows=1 loops=1)

6. 0.730 0.730 ↑ 1,000.0 1 1

Function Scan on xray seven_tango (cost=0.250..10.250 rows=1,000 width=4) (actual time=0.730..0.730 rows=1 loops=1)

7. 120.536 120.536 ↑ 1,000.0 1 1

Function Scan on romeo_november (cost=0.250..10.250 rows=1,000 width=8) (actual time=120.535..120.536 rows=1 loops=1)

8. 117.305 117.305 ↑ 1,000.0 1 1

Function Scan on romeo_november tango_two (cost=0.250..10.250 rows=1,000 width=4) (actual time=117.305..117.305 rows=1 loops=1)

9. 116.838 116.838 ↑ 1,000.0 1 1

Function Scan on romeo_november seven_xray (cost=0.250..10.250 rows=1,000 width=8) (actual time=116.837..116.838 rows=1 loops=1)

10. 116.868 116.868 ↑ 1,000.0 1 1

Function Scan on romeo_november foxtrot (cost=0.250..10.250 rows=1,000 width=4) (actual time=116.868..116.868 rows=1 loops=1)

11. 0.001 102.279 ↓ 0.0 0 1

Limit (cost=1.020..106.130 rows=1 width=4) (actual time=102.279..102.279 rows=0 loops=1)

12. 7.186 102.278 ↓ 0.0 0 1

Hash Join (cost=1.020..20,708.080 rows=197 width=4) (actual time=102.278..102.278 rows=0 loops=1)

  • Hash Cond: ((lima.india)::text = (quebec.four)::text)
13. 95.081 95.081 ↑ 1.0 45,937 1

Seq Scan on tango_juliet lima (cost=0.000..20,583.420 rows=46,265 width=3) (actual time=0.023..95.081 rows=45,937 loops=1)

  • Filter: (zulu_two = 36)
  • Rows Removed by Filter: 45937
14. 0.006 0.011 ↑ 1.0 1 1

Hash (cost=1.010..1.010 rows=1 width=72) (actual time=0.011..0.011 rows=1 loops=1)

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

Seq Scan on charlie_yankee quebec (cost=0.000..1.010 rows=1 width=72) (actual time=0.005..0.005 rows=1 loops=1)

16. 97.445 97.445 ↓ 0.0 0 1

Function Scan on juliet_yankee (cost=0.250..10.250 rows=1,000 width=4) (actual time=97.445..97.445 rows=0 loops=1)

17. 186.810 186.810 ↓ 0.0 0 1

Function Scan on seven_foxtrot (cost=0.250..10.250 rows=1,000 width=4) (actual time=186.810..186.810 rows=0 loops=1)

18. 0.001 106.414 ↓ 0.0 0 1

Limit (cost=1.020..400.200 rows=1 width=4) (actual time=106.414..106.414 rows=0 loops=1)

19. 7.318 106.413 ↓ 0.0 0 1

Hash Join (cost=1.020..20,758.460 rows=52 width=4) (actual time=106.413..106.413 rows=0 loops=1)

  • Hash Cond: ((six_alpha1.november)::text = (golf_juliet1.november)::text)
20. 98.733 98.733 ↑ 1.0 45,937 1

Seq Scan on tango_juliet three_kilo (cost=0.000..20,583.420 rows=46,265 width=3) (actual time=0.011..98.733 rows=45,937 loops=1)

  • Filter: (zulu_two = 36)
  • Rows Removed by Filter: 45937
21. 0.004 0.362 ↑ 1.0 1 1

Hash (cost=1.010..1.010 rows=1 width=520) (actual time=0.362..0.362 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.358 0.358 ↑ 1.0 1 1

Seq Scan on six_quebec zulu_zulu (cost=0.000..1.010 rows=1 width=520) (actual time=0.357..0.358 rows=1 loops=1)

23. 107.670 107.670 ↑ 1.0 45,937 1

Seq Scan on tango_juliet seven_uniform (cost=0.000..20,583.420 rows=46,265 width=21) (actual time=61.155..107.670 rows=45,937 loops=1)

  • Filter: (zulu_two = 36)
  • Rows Removed by Filter: 45937
24. 36.144 209.055 ↓ 1.0 95,354 1

Hash (cost=24,139.900..24,139.900 rows=93,684 width=17) (actual time=209.055..209.055 rows=95,354 loops=1)

  • Buckets: 65536 Batches: 2 Memory Usage: 2820kB
25. 49.791 172.911 ↓ 1.0 95,354 1

Hash Join (cost=2,504.790..24,139.900 rows=93,684 width=17) (actual time=49.330..172.911 rows=95,354 loops=1)

  • Hash Cond: ((charlie_six.uniform_india)::text = (echo.victor_delta)::text)
26. 74.159 74.159 ↑ 1.0 91,874 1

Seq Scan on tango_juliet charlie_six (cost=0.000..20,353.740 rows=91,874 width=9) (actual time=0.011..74.159 rows=91,874 loops=1)

27. 11.836 48.961 ↑ 1.0 35,617 1

Hash (cost=2,059.580..2,059.580 rows=35,617 width=17) (actual time=48.961..48.961 rows=35,617 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2217kB
28. 15.407 37.125 ↑ 1.0 35,617 1

Hash Join (cost=1,077.900..2,059.580 rows=35,617 width=17) (actual time=17.355..37.125 rows=35,617 loops=1)

  • Hash Cond: (romeo_three.three_golf = echo.three_golf)
29. 4.627 4.627 ↑ 1.0 35,617 1

Seq Scan on papa romeo_three (cost=0.000..888.170 rows=35,617 width=8) (actual time=0.007..4.627 rows=35,617 loops=1)

30. 9.652 17.091 ↑ 1.0 34,929 1

Hash (cost=641.290..641.290 rows=34,929 width=13) (actual time=17.091..17.091 rows=34,929 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2047kB
31. 7.439 7.439 ↑ 1.0 34,929 1

Seq Scan on zulu_four echo (cost=0.000..641.290 rows=34,929 width=13) (actual time=0.009..7.439 rows=34,929 loops=1)

32.          

CTE golf_delta

33. 22.938 176.671 ↓ 1.0 47,677 1

Hash Join (cost=2,504.790..23,733.470 rows=47,176 width=17) (actual time=114.358..176.671 rows=47,677 loops=1)

  • Hash Cond: ((oscar1.uniform_india)::text = (uniform_lima1.victor_delta)::text)
34. 102.681 102.681 ↑ 1.0 45,937 1

Seq Scan on tango_juliet charlie_two (cost=0.000..20,583.420 rows=46,265 width=9) (actual time=63.019..102.681 rows=45,937 loops=1)

  • Filter: (zulu_two = 36)
  • Rows Removed by Filter: 45937
35. 12.843 51.052 ↑ 1.0 35,617 1

Hash (cost=2,059.580..2,059.580 rows=35,617 width=17) (actual time=51.052..51.052 rows=35,617 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2321kB
36. 15.613 38.209 ↑ 1.0 35,617 1

Hash Join (cost=1,077.900..2,059.580 rows=35,617 width=17) (actual time=18.044..38.209 rows=35,617 loops=1)

  • Hash Cond: (six_lima1.three_golf = uniform_lima1.three_golf)
37. 4.805 4.805 ↑ 1.0 35,617 1

Seq Scan on papa victor_echo (cost=0.000..888.170 rows=35,617 width=8) (actual time=0.010..4.805 rows=35,617 loops=1)

38. 10.011 17.791 ↑ 1.0 34,929 1

Hash (cost=641.290..641.290 rows=34,929 width=13) (actual time=17.791..17.791 rows=34,929 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 2150kB
39. 7.780 7.780 ↑ 1.0 34,929 1

Seq Scan on zulu_four victor_golf (cost=0.000..641.290 rows=34,929 width=13) (actual time=0.009..7.780 rows=34,929 loops=1)

40. 27.263 230.945 ↓ 1.0 47,677 1

Sort (cost=4,605.740..4,723.680 rows=47,176 width=4) (actual time=226.326..230.945 rows=47,677 loops=1)

  • Sort Key: golf_delta.romeo_hotel
  • Sort Method: quicksort Memory: 3601kB
41. 203.682 203.682 ↓ 1.0 47,677 1

CTE Scan on golf_delta (cost=0.000..943.520 rows=47,176 width=4) (actual time=114.361..203.682 rows=47,677 loops=1)

42. 49.837 1,992.378 ↓ 4.2 515,642 1

Materialize (cost=24,008.840..24,629.280 rows=124,089 width=184) (actual time=1,905.991..1,992.378 rows=515,642 loops=1)

43. 209.521 1,942.541 ↓ 1.5 181,594 1

Sort (cost=24,008.840..24,319.060 rows=124,089 width=184) (actual time=1,905.986..1,942.541 rows=181,594 loops=1)

  • Sort Key: juliet_xray.romeo_hotel
  • Sort Method: external merge Disk: 14792kB
44. 1,733.020 1,733.020 ↓ 1.5 181,594 1

CTE Scan on whiskey juliet_xray (cost=0.000..2,481.780 rows=124,089 width=184) (actual time=1,236.877..1,733.020 rows=181,594 loops=1)

Planning time : 3.840 ms