explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lWIM : Optimization for: plan #gWgH

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.018 52.531 ↑ 1.5 172 1

Limit (cost=18,672.92..18,690.42 rows=250 width=562) (actual time=52.342..52.531 rows=172 loops=1)

2. 0.146 52.513 ↑ 17.6 172 1

Unique (cost=18,672.92..18,885.16 rows=3,032 width=562) (actual time=52.341..52.513 rows=172 loops=1)

3. 0.277 52.367 ↑ 17.6 172 1

Sort (cost=18,672.92..18,680.50 rows=3,032 width=562) (actual time=52.340..52.367 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, kilo1.quebec_seven, kilo1.juliet_delta, kilo1.three, kilo2.quebec_seven, kilo2.juliet_delta, kilo2.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. 5.349 52.090 ↑ 17.6 172 1

Hash Left Join (cost=2,123.43..18,497.58 rows=3,032 width=562) (actual time=12.869..52.090 rows=172 loops=1)

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

Hash Left Join (cost=1,848.93..16,668.77 rows=3,032 width=1,142) (actual time=11.990..45.917 rows=172 loops=1)

  • Hash Cond: (echo_seven1.four_delta = kilo2.quebec_seven)
6. 0.212 45.088 ↑ 17.6 172 1

Nested Loop Left Join (cost=1,643.63..16,455.48 rows=3,032 width=1,081) (actual time=11.265..45.088 rows=172 loops=1)

7. 0.107 44.016 ↑ 17.4 172 1

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

  • Hash Cond: (lima_delta1.quebec_seven = zulu_uniform1.sierra_foxtrot)
8. 0.147 41.672 ↑ 17.4 172 1

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

  • Hash Cond: ((lima_delta1.juliet_hotel = alpha_oscar1.foxtrot_charlie) AND (kilo1.quebec_seven = alpha_oscar1.uniform_bravo))
9. 0.148 41.060 ↑ 17.4 172 1

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

  • Hash Cond: (lima_delta1.lima_echo = kilo1.quebec_seven)
10. 0.144 36.523 ↑ 17.4 172 1

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

  • Hash Cond: (lima_delta1.two_romeo = papa_kilo1.quebec_seven)
11. 0.116 32.365 ↑ 17.4 172 1

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

  • Hash Cond: (lima_delta1.four_sierra = romeo_three1.quebec_seven)
12. 0.166 32.231 ↑ 17.4 172 1

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

  • Join Filter: (lima_delta1.juliet_hotel = uniform_delta1.quebec_seven)
13. 32.065 32.065 ↑ 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.047..32.065 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,035
14. 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)

15. 0.008 0.008 ↑ 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.008..0.008 rows=1 loops=1)

  • Index Cond: (quebec_seven = 81)
16. 0.005 0.018 ↑ 1.0 13 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
17. 0.013 0.013 ↑ 1.0 13 1

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

18. 1.783 4.014 ↓ 1.0 8,167 1

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

  • Buckets: 8,192 Batches: 1 Memory Usage: 569kB
19. 2.231 2.231 ↓ 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.231 rows=8,167 loops=1)

20. 1.305 4.389 ↑ 1.0 5,181 1

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

  • Buckets: 8,192 Batches: 1 Memory Usage: 569kB
21. 3.084 3.084 ↑ 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.010..3.084 rows=5,181 loops=1)

22. 0.120 0.465 ↓ 1.0 352 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 65kB
23. 0.345 0.345 ↓ 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.026..0.345 rows=352 loops=1)

  • Index Cond: (foxtrot_charlie = 81)
24. 1.035 2.237 ↑ 1.0 2,541 1

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

  • Buckets: 4,096 Batches: 1 Memory Usage: 1,354kB
25. 1.202 1.202 ↑ 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.202 rows=2,541 loops=1)

26. 0.860 0.860 ↑ 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.005..0.005 rows=1 loops=172)

  • Index Cond: (sierra_foxtrot = lima_delta1.quebec_seven)
27. 0.214 0.715 ↑ 1.0 902 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 98kB
28. 0.501 0.501 ↑ 1.0 902 1

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

29. 0.287 0.824 ↓ 1.0 1,193 1

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

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

Seq Scan on whiskey_tango hotel (cost=0.00..259.78 rows=1,178 width=41) (actual time=0.008..0.537 rows=1,193 loops=1)

Planning time : 8.939 ms
Execution time : 52.750 ms