explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mcri : Optimization for: plan #gWgH

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.013 40.746 ↑ 1.5 172 1

Limit (cost=18,718.98..18,736.48 rows=250 width=562) (actual time=40.609..40.746 rows=172 loops=1)

2. 0.101 40.733 ↑ 17.6 172 1

Unique (cost=18,718.98..18,931.22 rows=3,032 width=562) (actual time=40.609..40.733 rows=172 loops=1)

3. 0.234 40.632 ↑ 17.6 172 1

Sort (cost=18,718.98..18,726.56 rows=3,032 width=562) (actual time=40.608..40.632 rows=172 loops=1)

  • Sort Key: lima_delta1.mike_seven, lima_delta1.november_seven, lima_delta1.quebec_seven, lima_delta1.juliet_delta, lima_delta1.oscar_four, lima_delta1.foxtrot_bravo, lima_delta1.golf_echo, lima_delta1.zulu_alpha, lima_delta1.november_romeo, romeo_three1.three, romeo_three1.six_xray, kilo_foxtrot1.quebec_seven, kilo_foxtrot1.juliet_delta, kilo_foxtrot1.three, kilo_foxtrot2.quebec_seven, kilo_foxtrot2.juliet_delta, kilo_foxtrot2.three, alpha_seven1.three, alpha_seven1.yankee_tango, uniform_delta1.quebec_seven, uniform_delta1.juliet_delta, uniform_delta1.three, papa_kilo1.whiskey_zulu, echo_seven1.victor_five, ((zulu_uniform1.oscar_sierra five_romeo NOT NULL)), (six_uniform(0, alpha_oscar1.six_uniform, lima_delta1.foxtrot_bravo, LOCALTIMESTAMP, lima_delta1.mike_seven)), ((six_uniform(1, alpha_oscar1.six_uniform, lima_delta1.foxtrot_bravo, LOCALTIMESTAMP, lima_delta1.mike_seven))::boolean)
  • Sort Method: quicksort Memory: 159kB
4. 4.020 40.398 ↑ 17.6 172 1

Hash Left Join (cost=2,123.43..18,543.64 rows=3,032 width=562) (actual time=10.773..40.398 rows=172 loops=1)

  • Hash Cond: (echo_seven1.delta_kilo = alpha_seven1.quebec_seven)
5. 0.095 35.710 ↑ 17.6 172 1

Hash Left Join (cost=1,848.93..16,714.83 rows=3,032 width=1,142) (actual time=10.058..35.710 rows=172 loops=1)

  • Hash Cond: (echo_seven1.four_delta = kilo_foxtrot2.quebec_seven)
6. 0.202 35.112 ↑ 17.6 172 1

Nested Loop Left Join (cost=1,643.63..16,501.55 rows=3,032 width=1,081) (actual time=9.545..35.112 rows=172 loops=1)

7. 0.121 34.222 ↑ 17.4 172 1

Nested Loop Left Join (cost=1,643.20..8,842.75 rows=3,000 width=1,057) (actual time=9.533..34.222 rows=172 loops=1)

  • Join Filter: (lima_delta1.juliet_hotel = india1.yankee_zulu)
8. 0.099 34.101 ↑ 17.4 172 1

Hash Left Join (cost=1,643.20..8,796.68 rows=3,000 width=1,057) (actual time=9.522..34.101 rows=172 loops=1)

  • Hash Cond: (lima_delta1.quebec_seven = zulu_uniform1.sierra_foxtrot)
9. 0.113 32.307 ↑ 17.4 172 1

Hash Left Join (cost=1,151.26..8,289.74 rows=3,000 width=390) (actual time=7.817..32.307 rows=172 loops=1)

  • Hash Cond: ((lima_delta1.juliet_hotel = alpha_oscar1.foxtrot_charlie) AND (kilo_foxtrot1.quebec_seven = alpha_oscar1.uniform_bravo))
10. 0.138 31.836 ↑ 17.4 172 1

Hash Left Join (cost=952.82..8,075.53 rows=3,000 width=354) (actual time=7.448..31.836 rows=172 loops=1)

  • Hash Cond: (lima_delta1.lima_echo = kilo_foxtrot1.quebec_seven)
11. 0.114 28.195 ↑ 17.4 172 1

Hash Left Join (cost=345.25..7,460.08 rows=3,000 width=295) (actual time=3.927..28.195 rows=172 loops=1)

  • Hash Cond: (lima_delta1.two_romeo = papa_kilo1.quebec_seven)
12. 0.091 24.249 ↑ 17.4 172 1

Hash Left Join (cost=2.12..7,109.07 rows=3,000 width=284) (actual time=0.081..24.249 rows=172 loops=1)

  • Hash Cond: (lima_delta1.four_sierra = romeo_three1.quebec_seven)
13. 0.119 24.140 ↑ 17.4 172 1

Nested Loop Left Join (cost=0.83..7,097.34 rows=3,000 width=275) (actual time=0.058..24.140 rows=172 loops=1)

  • Join Filter: (lima_delta1.juliet_hotel = uniform_delta1.quebec_seven)
14. 24.021 24.021 ↑ 17.4 172 1

Index Scan using papa_yankee on foxtrot_romeo quebec_sierra (cost=0.56..7,049.84 rows=3,000 width=179) (actual time=0.046..24.021 rows=172 loops=1)

  • Index Cond: ((lima_romeo)::text = 'quebec_quebec'::text)
  • Filter: (((NOT papa_bravo) OR (papa_bravo five_romeo NULL)) AND (juliet_hotel = 81))
  • Rows Removed by Filter: 27,034
15. 0.000 0.000 ↑ 1.0 1 172

Materialize (cost=0.27..2.50 rows=1 width=96) (actual time=0.000..0.000 rows=1 loops=172)

16. 0.009 0.009 ↑ 1.0 1 1

Index Scan using two_delta on echo_zulu mike_quebec (cost=0.27..2.49 rows=1 width=96) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (quebec_seven = 81)
17. 0.006 0.018 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=25) (actual time=0.018..0.018 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.012 0.012 ↑ 1.0 13 1

Seq Scan on tango four_uniform (cost=0.00..1.13 rows=13 width=25) (actual time=0.009..0.012 rows=13 loops=1)

19. 1.685 3.832 ↓ 1.0 8,167 1

Hash (cost=241.39..241.39 rows=8,139 width=27) (actual time=3.831..3.832 rows=8,167 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 569kB
20. 2.147 2.147 ↓ 1.0 8,167 1

Seq Scan on golf_five uniform_romeo (cost=0.00..241.39 rows=8,139 width=27) (actual time=0.004..2.147 rows=8,167 loops=1)

21. 1.235 3.503 ↑ 1.0 5,181 1

Hash (cost=542.81..542.81 rows=5,181 width=67) (actual time=3.503..3.503 rows=5,181 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 569kB
22. 2.268 2.268 ↑ 1.0 5,181 1

Seq Scan on sierra_three whiskey_six (cost=0.00..542.81 rows=5,181 width=67) (actual time=0.007..2.268 rows=5,181 loops=1)

23. 0.085 0.358 ↓ 1.0 352 1

Hash (cost=193.23..193.23 rows=347 width=52) (actual time=0.358..0.358 rows=352 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 65kB
24. 0.273 0.273 ↓ 1.0 352 1

Index Scan using five_victor on delta_alpha five_xray (cost=0.28..193.23 rows=347 width=52) (actual time=0.012..0.273 rows=352 loops=1)

  • Index Cond: (foxtrot_charlie = 81)
25. 0.667 1.695 ↑ 1.0 2,541 1

Hash (cost=459.75..459.75 rows=2,575 width=675) (actual time=1.694..1.695 rows=2,541 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 1,354kB
26. 1.028 1.028 ↑ 1.0 2,541 1

Seq Scan on juliet_november romeo_kilo (cost=0.00..459.75 rows=2,575 width=675) (actual time=0.007..1.028 rows=2,541 loops=1)

27. 0.000 0.000 ↑ 1.0 1 172

Materialize (cost=0.00..1.06 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=172)

28. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on hotel_three romeo_foxtrot (cost=0.00..1.06 rows=1 width=8) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((yankee_zulu = 81) AND ((juliet_charlie)::text = 'kilo_papa'::text))
  • Rows Removed by Filter: 3
29. 0.688 0.688 ↑ 1.0 1 172

Index Scan using charlie on uniform_kilo victor_romeo (cost=0.43..2.54 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=172)

  • Index Cond: (sierra_foxtrot = lima_delta1.quebec_seven)
30. 0.140 0.503 ↑ 1.0 902 1

Hash (cost=194.02..194.02 rows=902 width=69) (actual time=0.503..0.503 rows=902 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 98kB
31. 0.363 0.363 ↑ 1.0 902 1

Seq Scan on oscar_oscar yankee_xray (cost=0.00..194.02 rows=902 width=69) (actual time=0.004..0.363 rows=902 loops=1)

32. 0.200 0.668 ↓ 1.0 1,193 1

Hash (cost=259.78..259.78 rows=1,178 width=41) (actual time=0.668..0.668 rows=1,193 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 107kB
33. 0.468 0.468 ↓ 1.0 1,193 1

Seq Scan on whiskey_tango hotel_golf (cost=0.00..259.78 rows=1,178 width=41) (actual time=0.005..0.468 rows=1,193 loops=1)

Planning time : 10.471 ms
Execution time : 40.940 ms