explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fzFj

Settings
# exclusive inclusive rows x rows loops node
1. 0.033 236.066 ↑ 2.0 1 1

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

2. 0.011 236.032 ↑ 2.0 1 1

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

3. 14.504 235.982 ↑ 2.0 1 1

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

  • Hash Cond: (sc.code = ai.sender_city_code)
4. 23.352 33.231 ↓ 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=10.520..33.231 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
5. 9.879 9.879 ↓ 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=9.879..9.879 rows=59,916 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 14.326 188.237 ↑ 2.0 1 1

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

  • Hash Cond: (rc.code = ai.receiver_city_code)
8. 24.959 32.327 ↓ 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=8.319..32.327 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
9. 7.368 7.368 ↓ 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=7.368..7.368 rows=59,916 loops=1)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.005 141.577 ↑ 2.0 1 1

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

12. 0.004 141.562 ↑ 1.0 1 1

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

13. 0.005 141.539 ↑ 1.0 1 1

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

14. 0.023 141.517 ↑ 1.0 1 1

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

15. 0.006 141.465 ↑ 1.0 1 1

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

16. 0.396 0.396 ↑ 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.392..0.396 rows=1 loops=1)

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

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

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

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

19. 0.024 35.618 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 9.241 35.594 ↑ 1.0 1 1

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

  • Hash Cond: (ci.code = c.city_code)
21. 20.214 26.315 ↓ 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=6.688..26.315 rows=59,916 loops=1)

  • Recheck Cond: (lang = 'rus'::text)
  • Heap Blocks: exact=2899
22. 6.101 6.101 ↓ 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.101..6.101 rows=59,916 loops=1)

  • Index Cond: (lang = 'rus'::text)
23. 0.004 0.038 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.034 0.034 ↑ 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.033..0.034 rows=1 loops=1)

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

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

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

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

  • Index Cond: ((ci.region_code = code) AND (lang = 'rus'::text))
29. 0.039 0.039 ↑ 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.037..0.039 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 : 4.539 ms
Execution time : 236.427 ms