explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6hpA

Settings
# exclusive inclusive rows x rows loops node
1. 0.043 233.669 ↑ 2.0 1 1

Nested Loop Left Join (cost=19,535.96..23,494.17 rows=2 width=598) (actual time=233.664..233.669 rows=1 loops=1)

2. 0.030 233.625 ↑ 2.0 1 1

Nested Loop Left Join (cost=19,535.81..23,493.80 rows=2 width=594) (actual time=233.621..233.625 rows=1 loops=1)

3. 8.876 233.569 ↑ 2.0 1 1

Hash Right Join (cost=19,535.53..23,477.18 rows=2 width=558) (actual time=233.566..233.569 rows=1 loops=1)

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

Bitmap Heap Scan on city sc (cost=1,121.72..4,765.74 rows=59,522 width=31) (actual time=7.017..27.786 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
5. 6.466 6.466 ↓ 1.0 59,916 1

Bitmap Index Scan on city_lang_idx (cost=0.00..1,106.84 rows=59,522 width=0) (actual time=6.466..6.466 rows=59,916 loops=1)

  • Index Cond: (lang = 'rus'::text)
6. 0.012 196.907 ↑ 2.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 10.795 196.895 ↑ 2.0 1 1

Hash Right Join (cost=14,472.13..18,413.79 rows=2 width=532) (actual time=196.891..196.895 rows=1 loops=1)

  • Hash Cond: (rc.code = ai.receiver_city_code)
8. 21.773 28.354 ↓ 1.0 59,916 1

Bitmap Heap Scan on city rc (cost=1,121.72..4,765.74 rows=59,522 width=31) (actual time=7.201..28.354 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
9. 6.581 6.581 ↓ 1.0 59,916 1

Bitmap Index Scan on city_lang_idx (cost=0.00..1,106.84 rows=59,522 width=0) (actual time=6.581..6.581 rows=59,916 loops=1)

  • Index Cond: (lang = 'rus'::text)
10. 0.009 157.746 ↑ 2.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.007 157.737 ↑ 2.0 1 1

Nested Loop Left Join (cost=4,999.36..13,350.39 rows=2 width=506) (actual time=88.470..157.737 rows=1 loops=1)

12. 0.006 157.714 ↑ 1.0 1 1

Nested Loop Left Join (cost=4,999.08..13,350.08 rows=1 width=488) (actual time=88.449..157.714 rows=1 loops=1)

13. 0.008 157.681 ↑ 1.0 1 1

Nested Loop Left Join (cost=4,998.52..13,349.43 rows=1 width=472) (actual time=88.416..157.681 rows=1 loops=1)

14. 0.014 157.653 ↑ 1.0 1 1

Nested Loop Left Join (cost=4,998.11..13,340.98 rows=1 width=425) (actual time=88.389..157.653 rows=1 loops=1)

15. 0.007 157.605 ↑ 1.0 1 1

Nested Loop Left Join (cost=4,997.83..13,340.68 rows=1 width=410) (actual time=88.342..157.605 rows=1 loops=1)

16. 0.657 0.657 ↑ 1.0 1 1

Index Scan using additional_information_reciever_city_code_idx on additional_information ai (cost=0.28..133.41 rows=1 width=244) (actual time=0.653..0.657 rows=1 loops=1)

  • Filter: (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text)
  • Rows Removed by Filter: 753
17. 52.972 156.941 ↑ 1.0 1 1

Hash Right Join (cost=4,997.56..13,207.26 rows=1 width=166) (actual time=87.683..156.941 rows=1 loops=1)

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

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

19. 0.011 43.944 ↑ 1.0 1 1

Hash (cost=4,997.55..4,997.55 rows=1 width=155) (actual time=43.944..43.944 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 9.005 43.933 ↑ 1.0 1 1

Hash Right Join (cost=1,130.30..4,997.55 rows=1 width=155) (actual time=29.391..43.933 rows=1 loops=1)

  • Hash Cond: (ci.code = c.city_code)
21. 21.308 34.897 ↓ 1.0 59,916 1

Bitmap Heap Scan on city ci (cost=1,121.72..4,765.74 rows=59,522 width=36) (actual time=14.056..34.897 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
22. 13.589 13.589 ↓ 1.0 59,916 1

Bitmap Index Scan on city_lang_idx (cost=0.00..1,106.84 rows=59,522 width=0) (actual time=13.589..13.589 rows=59,916 loops=1)

  • Index Cond: (lang = 'rus'::text)
23. 0.006 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
24. 0.025 0.025 ↑ 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.025 rows=1 loops=1)

  • Index Cond: (code = ai.payer_contragent_code)
25. 0.034 0.034 ↑ 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.034..0.034 rows=1 loops=1)

  • Index Cond: ((code = ci.country_code) AND (lang = 'rus'::text))
26. 0.020 0.020 ↑ 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.020..0.020 rows=1 loops=1)

  • Index Cond: ((ai.user_code = code) AND (lang = 'rus'::text))
27. 0.027 0.027 ↓ 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.027..0.027 rows=0 loops=1)

  • Index Cond: (c.code = contragent_code)
28. 0.016 0.016 ↑ 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.015..0.016 rows=1 loops=1)

  • Index Cond: ((ci.region_code = code) AND (lang = 'rus'::text))
29. 0.026 0.026 ↑ 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.025..0.026 rows=1 loops=1)

  • Index Cond: ((code = ai.order_service_code) AND (lang = 'rus'::text))
30. 0.001 0.001 ↓ 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.001..0.001 rows=0 loops=1)

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