explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ximH : Optimization for: Optimization for: plan #yWnq; plan #Mjxa

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 51.066 ↓ 3.6 94 1

Limit (cost=7,731.32..7,733.14 rows=26 width=554) (actual time=50.985..51.066 rows=94 loops=1)

2. 0.061 51.058 ↓ 3.6 94 1

Unique (cost=7,731.32..7,733.14 rows=26 width=554) (actual time=50.984..51.058 rows=94 loops=1)

3. 0.139 50.997 ↓ 3.6 94 1

Sort (cost=7,731.32..7,731.38 rows=26 width=554) (actual time=50.983..50.997 rows=94 loops=1)

  • Sort Key: lima_delta1.quebec_seven, lima_delta1.juliet_delta, lima_delta1.oscar_four, lima_delta1.november_seven, lima_delta1.mike_seven, 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: 95kB
4. 2.469 50.858 ↓ 3.6 94 1

Nested Loop Left Join (cost=338.03..7,730.71 rows=26 width=554) (actual time=2.332..50.858 rows=94 loops=1)

5. 0.108 48.389 ↓ 3.6 94 1

Nested Loop (cost=337.76..7,709.77 rows=26 width=1,134) (actual time=2.223..48.389 rows=94 loops=1)

6. 0.120 48.187 ↓ 3.6 94 1

Nested Loop (cost=337.48..7,702.17 rows=26 width=1,073) (actual time=2.215..48.187 rows=94 loops=1)

7. 0.006 47.687 ↓ 3.7 95 1

Nested Loop Left Join (cost=337.05..7,651.19 rows=26 width=1,049) (actual time=2.208..47.687 rows=95 loops=1)

8. 0.038 47.206 ↓ 3.7 95 1

Nested Loop (cost=336.77..7,642.77 rows=26 width=382) (actual time=2.203..47.206 rows=95 loops=1)

9. 0.085 46.883 ↓ 3.7 95 1

Nested Loop (cost=336.49..7,634.80 rows=26 width=371) (actual time=2.197..46.883 rows=95 loops=1)

  • Join Filter: (lima_delta1.four_sierra = romeo_three1.quebec_seven)
  • Rows Removed by Join Filter: 170
10. 0.069 46.798 ↓ 3.7 95 1

Nested Loop (cost=336.49..7,628.90 rows=26 width=362) (actual time=2.191..46.798 rows=95 loops=1)

11. 0.083 46.444 ↓ 3.5 95 1

Nested Loop (cost=336.20..7,620.27 rows=27 width=311) (actual time=2.183..46.444 rows=95 loops=1)

12. 10.900 46.171 ↑ 3.3 95 1

Nested Loop Left Join (cost=335.93..7,527.20 rows=318 width=231) (actual time=2.176..46.171 rows=95 loops=1)

  • Join Filter: (lima_delta1.juliet_hotel = india1.quebec_hotel)
  • Rows Removed by Join Filter: 52,823
  • Filter: ((lima_delta1.juliet_hotel = 81) OR (india1.yankee_zulu = 81))
  • Rows Removed by Filter: 17,516
13. 6.339 35.271 ↓ 18.0 17,611 1

Hash Join (cost=335.93..7,467.46 rows=978 width=231) (actual time=2.153..35.271 rows=17,611 loops=1)

  • Hash Cond: ((lima_delta1.juliet_hotel = alpha_oscar1.foxtrot_charlie) AND (lima_delta1.lima_echo = alpha_oscar1.uniform_bravo))
14. 26.829 26.829 ↑ 1.7 17,611 1

Index Scan using papa_yankee on foxtrot_romeo quebec_sierra (cost=0.56..6,975.07 rows=29,909 width=179) (actual time=0.031..26.829 rows=17,611 loops=1)

  • Index Cond: ((lima_romeo)::text = 'quebec_quebec'::text)
  • Filter: ((NOT papa_bravo) OR (papa_bravo five_romeo NULL))
  • Rows Removed by Filter: 9,402
15. 0.813 2.103 ↓ 1.0 5,539 1

Hash (cost=252.95..252.95 rows=5,495 width=52) (actual time=2.103..2.103 rows=5,539 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 501kB
16. 1.290 1.290 ↓ 1.0 5,539 1

Seq Scan on delta_alpha five_xray (cost=0.00..252.95 rows=5,495 width=52) (actual time=0.009..1.290 rows=5,539 loops=1)

17. 0.000 0.000 ↑ 1.0 3 17,611

Materialize (cost=0.00..1.06 rows=3 width=16) (actual time=0.000..0.000 rows=3 loops=17,611)

18. 0.006 0.006 ↑ 1.0 3 1

Seq Scan on hotel_three romeo_foxtrot (cost=0.00..1.05 rows=3 width=16) (actual time=0.005..0.006 rows=3 loops=1)

  • Filter: ((juliet_charlie)::text = 'kilo_papa'::text)
  • Rows Removed by Filter: 1
19. 0.190 0.190 ↑ 1.0 1 95

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

  • Index Cond: (quebec_seven = lima_delta1.juliet_hotel)
20. 0.285 0.285 ↑ 1.0 1 95

Index Scan using sierra_delta on sierra_three whiskey_six (cost=0.28..0.32 rows=1 width=67) (actual time=0.003..0.003 rows=1 loops=95)

  • Index Cond: (quebec_seven = lima_delta1.lima_echo)
21. 0.000 0.000 ↑ 4.3 3 95

Materialize (cost=0.00..1.19 rows=13 width=25) (actual time=0.000..0.000 rows=3 loops=95)

22. 0.004 0.004 ↑ 4.3 3 1

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

23. 0.285 0.285 ↑ 1.0 1 95

Index Scan using kilo_charlie on golf_five uniform_romeo (cost=0.28..0.31 rows=1 width=27) (actual time=0.003..0.003 rows=1 loops=95)

  • Index Cond: (quebec_seven = lima_delta1.two_romeo)
24. 0.475 0.475 ↓ 0.0 0 95

Index Scan using five_oscar on juliet_november romeo_kilo (cost=0.28..0.31 rows=1 width=675) (actual time=0.005..0.005 rows=0 loops=95)

  • Index Cond: (lima_delta1.quebec_seven = sierra_foxtrot)
25. 0.380 0.380 ↑ 1.0 1 95

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

  • Index Cond: (sierra_foxtrot = lima_delta1.quebec_seven)
26. 0.094 0.094 ↑ 1.0 1 94

Index Scan using kilo_kilo on oscar_oscar yankee_xray (cost=0.28..0.29 rows=1 width=69) (actual time=0.001..0.001 rows=1 loops=94)

  • Index Cond: (quebec_seven = echo_seven1.four_delta)
27. 0.000 0.000 ↓ 0.0 0 94

Index Scan using uniform_golf on whiskey_tango hotel_golf (cost=0.28..0.30 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=94)

  • Index Cond: (echo_seven1.delta_kilo = quebec_seven)
Planning time : 22.756 ms
Execution time : 51.279 ms