explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vq5C

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 0.642 ↓ 6.8 27 1

Result (cost=48.07..48.69 rows=4 width=148) (actual time=0.486..0.642 rows=27 loops=1)

2.          

CTE zulu_lima

3. 0.021 0.405 ↓ 3.0 27 1

Nested Loop (cost=0.71..46.86 rows=9 width=116) (actual time=0.067..0.405 rows=27 loops=1)

4. 0.147 0.330 ↓ 3.0 27 1

Nested Loop (cost=0.56..41.35 rows=9 width=52) (actual time=0.055..0.330 rows=27 loops=1)

  • Join Filter: ((four_bravo.tango_tango >= alpha_xray.foxtrot_three) AND (four_bravo.tango_tango <= alpha_xray.lima) AND (four_bravo.tango_tango >= alpha_xray.foxtrot_three) AND (four_bravo.tango_tango <= alpha_xray.lima))
  • Rows Removed by Join Filter: 675
5. 0.053 0.053 ↑ 1.0 26 1

Index Scan using tango_november on alpha_golf_papa four_bravo (cost=0.28..13.30 rows=26 width=28) (actual time=0.030..0.053 rows=26 loops=1)

  • Index Cond: (zulu_xray = 2)
6. 0.095 0.130 ↑ 1.0 27 26

Materialize (cost=0.28..12.32 rows=27 width=32) (actual time=0.001..0.005 rows=27 loops=26)

7. 0.035 0.035 ↑ 1.0 27 1

Index Scan using golf on november_november alpha_xray (cost=0.28..12.19 rows=27 width=32) (actual time=0.017..0.035 rows=27 loops=1)

  • Index Cond: (zulu_xray = 2)
8. 0.054 0.054 ↑ 1.0 1 27

Index Scan using yankee_seven on foxtrot_tango seven (cost=0.15..0.61 rows=1 width=72) (actual time=0.002..0.002 rows=1 loops=27)

  • Index Cond: (whiskey = alpha_xray.whiskey)
9.          

CTE yankee_india

10. 0.005 0.577 ↓ 8.7 26 1

Append (cost=0.45..1.21 rows=3 width=148) (actual time=0.481..0.577 rows=26 loops=1)

11. 0.000 0.482 ↑ 1.0 1 1

WindowAgg (cost=0.45..0.48 rows=1 width=148) (actual time=0.481..0.482 rows=1 loops=1)

12.          

Initplan (for WindowAgg)

13. 0.002 0.378 ↑ 1.0 1 1

Limit (cost=0.21..0.22 rows=1 width=4) (actual time=0.377..0.378 rows=1 loops=1)

14. 0.008 0.376 ↑ 1.0 1 1

Sort (cost=0.21..0.22 rows=1 width=4) (actual time=0.376..0.376 rows=1 loops=1)

  • Sort Key: four_four1.foxtrot_three
  • Sort Method: quicksort Memory: 25kB
15. 0.368 0.368 ↓ 2.0 2 1

CTE Scan on zulu_lima alpha_golf_foxtrot (cost=0.00..0.20 rows=1 width=4) (actual time=0.352..0.368 rows=2 loops=1)

  • Filter: ((hotel_quebec five NULL) AND (four_three = 'four_uniform'::text))
  • Rows Removed by Filter: 25
16. 0.014 0.473 ↑ 1.0 1 1

Sort (cost=0.24..0.24 rows=1 width=116) (actual time=0.473..0.473 rows=1 loops=1)

  • Sort Key: four_four3.foxtrot_three DESC
  • Sort Method: quicksort Memory: 25kB
17. 0.459 0.459 ↑ 1.0 1 1

CTE Scan on zulu_lima three (cost=0.00..0.23 rows=1 width=116) (actual time=0.459..0.459 rows=1 loops=1)

  • Filter: ((foxtrot_three > $2) AND (four_three = 'four_uniform'::text))
  • Rows Removed by Filter: 26
18. 0.002 0.015 ↑ 1.0 1 1

Subquery Scan on november_alpha (cost=0.21..0.23 rows=1 width=148) (actual time=0.015..0.015 rows=1 loops=1)

19. 0.000 0.013 ↑ 1.0 1 1

Limit (cost=0.21..0.22 rows=1 width=116) (actual time=0.013..0.013 rows=1 loops=1)

20. 0.005 0.013 ↑ 1.0 1 1

Sort (cost=0.21..0.22 rows=1 width=116) (actual time=0.013..0.013 rows=1 loops=1)

  • Sort Key: four_four4.foxtrot_three
  • Sort Method: quicksort Memory: 25kB
21. 0.008 0.008 ↓ 2.0 2 1

CTE Scan on zulu_lima papa (cost=0.00..0.20 rows=1 width=116) (actual time=0.007..0.008 rows=2 loops=1)

  • Filter: ((hotel_quebec five NULL) AND (four_three = 'four_uniform'::text))
  • Rows Removed by Filter: 25
22. 0.017 0.075 ↓ 24.0 24 1

WindowAgg (cost=0.45..0.48 rows=1 width=148) (actual time=0.048..0.075 rows=24 loops=1)

23.          

Initplan (for WindowAgg)

24. 0.001 0.011 ↑ 1.0 1 1

Limit (cost=0.21..0.22 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=1)

25. 0.003 0.010 ↑ 1.0 1 1

Sort (cost=0.21..0.22 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Sort Key: four_four2.foxtrot_three
  • Sort Method: quicksort Memory: 25kB
26. 0.007 0.007 ↓ 2.0 2 1

CTE Scan on zulu_lima hotel_uniform (cost=0.00..0.20 rows=1 width=4) (actual time=0.006..0.007 rows=2 loops=1)

  • Filter: ((hotel_quebec five NULL) AND (four_three = 'four_uniform'::text))
  • Rows Removed by Filter: 25
27. 0.020 0.047 ↓ 24.0 24 1

Sort (cost=0.24..0.24 rows=1 width=116) (actual time=0.044..0.047 rows=24 loops=1)

  • Sort Key: four_four5.foxtrot_three
  • Sort Method: quicksort Memory: 28kB
28. 0.027 0.027 ↓ 24.0 24 1

CTE Scan on zulu_lima two (cost=0.00..0.23 rows=1 width=116) (actual time=0.013..0.027 rows=24 loops=1)

  • Filter: ((foxtrot_three < $3) AND (four_three = 'four_uniform'::text))
  • Rows Removed by Filter: 3
29. 0.004 0.617 ↓ 6.8 27 1

Append (cost=0.00..0.27 rows=4 width=148) (actual time=0.484..0.617 rows=27 loops=1)

30. 0.604 0.604 ↓ 8.7 26 1

CTE Scan on yankee_india (cost=0.00..0.06 rows=3 width=148) (actual time=0.484..0.604 rows=26 loops=1)

31. 0.009 0.009 ↑ 1.0 1 1

CTE Scan on zulu_lima (cost=0.00..0.20 rows=1 width=148) (actual time=0.004..0.009 rows=1 loops=1)

  • Filter: (four_three = 'xray'::text)
  • Rows Removed by Filter: 26
32.          

SubPlan (for Result)

33. 0.001 0.006 ↑ 1.0 1 1

Limit (cost=0.00..0.08 rows=1 width=32) (actual time=0.005..0.006 rows=1 loops=1)

34. 0.005 0.005 ↑ 1.0 1 1

CTE Scan on yankee_india delta (cost=0.00..0.08 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=1)

  • Filter: ((yankee_india.foxtrot_three >= foxtrot_three) AND (yankee_india.foxtrot_three <= lima))
  • Rows Removed by Filter: 13