explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8IYB

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 340.232 ↑ 2.0 1 1

Nested Loop Left Join (cost=18,940.69..24,346.41 rows=2 width=598) (actual time=340.227..340.232 rows=1 loops=1)

2. 0.010 340.207 ↑ 2.0 1 1

Nested Loop Left Join (cost=18,940.54..24,346.03 rows=2 width=594) (actual time=340.203..340.207 rows=1 loops=1)

3. 7.972 340.178 ↑ 2.0 1 1

Hash Right Join (cost=18,940.26..24,329.42 rows=2 width=558) (actual time=340.175..340.178 rows=1 loops=1)

  • Hash Cond: (sc.code = ai.sender_city_code)
4. 45.481 45.481 ↓ 1.0 59,916 1

Seq Scan on city sc (cost=0.00..5,091.52 rows=59,522 width=31) (actual time=0.021..45.481 rows=59,916 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
5. 0.021 286.725 ↑ 2.0 1 1

Hash (cost=18,940.24..18,940.24 rows=2 width=532) (actual time=286.725..286.725 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 7.025 286.704 ↑ 2.0 1 1

Hash Right Join (cost=13,551.08..18,940.24 rows=2 width=532) (actual time=286.700..286.704 rows=1 loops=1)

  • Hash Cond: (rc.code = ai.receiver_city_code)
7. 40.034 40.034 ↓ 1.0 59,916 1

Seq Scan on city rc (cost=0.00..5,091.52 rows=59,522 width=31) (actual time=0.025..40.034 rows=59,916 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
8. 0.007 239.645 ↑ 2.0 1 1

Hash (cost=13,551.06..13,551.06 rows=2 width=506) (actual time=239.645..239.645 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.006 239.638 ↑ 2.0 1 1

Nested Loop Left Join (cost=5,325.14..13,551.06 rows=2 width=506) (actual time=142.929..239.638 rows=1 loops=1)

10. 0.004 239.620 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,324.86..13,550.75 rows=1 width=488) (actual time=142.913..239.620 rows=1 loops=1)

11. 0.007 239.592 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,324.31..13,550.10 rows=1 width=472) (actual time=142.885..239.592 rows=1 loops=1)

12. 0.009 239.566 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,323.89..13,541.65 rows=1 width=425) (actual time=142.861..239.566 rows=1 loops=1)

13. 0.005 239.530 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,323.62..13,541.34 rows=1 width=410) (actual time=142.826..239.530 rows=1 loops=1)

14. 0.022 0.022 ↑ 1.0 1 1

Index Scan using additional_information_download_code_key on additional_information ai (cost=0.28..8.29 rows=1 width=244) (actual time=0.018..0.022 rows=1 loops=1)

  • Index Cond: (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text)
15. 83.208 239.503 ↑ 1.0 1 1

Hash Right Join (cost=5,323.34..13,533.04 rows=1 width=166) (actual time=142.803..239.503 rows=1 loops=1)

  • Hash Cond: (con.contragent_code = c.code)
16. 75.149 75.149 ↑ 1.0 292,549 1

Seq Scan on contract con (cost=0.00..7,110.41 rows=293,141 width=41) (actual time=0.090..75.149 rows=292,549 loops=1)

17. 0.008 81.146 ↑ 1.0 1 1

Hash (cost=5,323.33..5,323.33 rows=1 width=155) (actual time=81.146..81.146 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 11.890 81.138 ↑ 1.0 1 1

Hash Right Join (cost=8.59..5,323.33 rows=1 width=155) (actual time=41.862..81.138 rows=1 loops=1)

  • Hash Cond: (ci.code = c.city_code)
19. 69.217 69.217 ↓ 1.0 59,916 1

Seq Scan on city ci (cost=0.00..5,091.52 rows=59,522 width=36) (actual time=0.020..69.217 rows=59,916 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
20. 0.005 0.031 ↑ 1.0 1 1

Hash (cost=8.57..8.57 rows=1 width=122) (actual time=0.031..0.031 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.026 0.026 ↑ 1.0 1 1

Index Scan using contragent_idx_code on contragent c (cost=0.56..8.57 rows=1 width=122) (actual time=0.025..0.026 rows=1 loops=1)

  • Index Cond: (code = ai.payer_contragent_code)
22. 0.027 0.027 ↑ 1.0 1 1

Index Scan using country_code_lang_key on country co (cost=0.28..0.30 rows=1 width=17) (actual time=0.026..0.027 rows=1 loops=1)

  • Index Cond: ((code = ci.country_code) AND (lang = 'rus'::text))
23. 0.019 0.019 ↑ 1.0 1 1

Index Scan using users_catalog_code_lang_key on users_catalog uc (cost=0.41..8.43 rows=1 width=52) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: ((ai.user_code = code) AND (lang = 'rus'::text))
24. 0.024 0.024 ↓ 0.0 0 1

Index Scan using phone_contragent_code_index on phone p (cost=0.56..0.64 rows=1 width=48) (actual time=0.024..0.024 rows=0 loops=1)

  • Index Cond: (c.code = contragent_code)
25. 0.012 0.012 ↑ 1.0 1 1

Index Scan using region_code_lang_key on region r (cost=0.28..0.30 rows=1 width=21) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: ((ci.region_code = code) AND (lang = 'rus'::text))
26. 0.019 0.019 ↑ 1.0 1 1

Index Scan using tariff_type_code_lang_key on tariff_type tt (cost=0.28..8.30 rows=1 width=39) (actual time=0.018..0.019 rows=1 loops=1)

  • Index Cond: ((code = ai.order_service_code) AND (lang = 'rus'::text))
27. 0.000 0.000 ↓ 0.0 0 1

Index Scan using phone_type_code_lang_key on phone_type pt (cost=0.15..0.17 rows=1 width=64) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: ((code = p.phone_type_alias) AND (lang = 'rus'::text))
Planning time : 6.812 ms
Execution time : 340.661 ms