explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xWjZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.077 293.229 ↑ 2.0 1 1

Nested Loop Left Join (cost=19,065.81..24,471.53 rows=2 width=598) (actual time=293.225..293.229 rows=1 loops=1)

2. 0.009 293.152 ↑ 2.0 1 1

Nested Loop Left Join (cost=19,065.66..24,471.15 rows=2 width=594) (actual time=293.148..293.152 rows=1 loops=1)

3. 6.644 293.124 ↑ 2.0 1 1

Hash Right Join (cost=19,065.38..24,454.54 rows=2 width=558) (actual time=293.121..293.124 rows=1 loops=1)

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

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

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

Hash (cost=19,065.36..19,065.36 rows=2 width=532) (actual time=251.561..251.561 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 6.553 251.545 ↑ 2.0 1 1

Hash Right Join (cost=13,676.20..19,065.36 rows=2 width=532) (actual time=251.540..251.545 rows=1 loops=1)

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.008 209.751 ↑ 2.0 1 1

Nested Loop Left Join (cost=5,325.14..13,676.18 rows=2 width=506) (actual time=150.814..209.751 rows=1 loops=1)

10. 0.020 209.729 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,324.86..13,675.87 rows=1 width=488) (actual time=150.793..209.729 rows=1 loops=1)

11. 0.005 209.686 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,324.31..13,675.21 rows=1 width=472) (actual time=150.752..209.686 rows=1 loops=1)

12. 0.009 209.614 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,323.89..13,666.77 rows=1 width=425) (actual time=150.681..209.614 rows=1 loops=1)

13. 0.008 209.579 ↑ 1.0 1 1

Nested Loop Left Join (cost=5,323.62..13,666.46 rows=1 width=410) (actual time=150.646..209.579 rows=1 loops=1)

14. 0.796 0.796 ↑ 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.794..0.796 rows=1 loops=1)

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

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

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

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

17. 0.007 86.225 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 12.339 86.218 ↑ 1.0 1 1

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

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

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

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

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

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

  • Index Cond: (code = ai.payer_contragent_code)
22. 0.026 0.026 ↑ 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.026 rows=1 loops=1)

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

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

  • Index Cond: (c.code = contragent_code)
25. 0.014 0.014 ↑ 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.013..0.014 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 : 7.629 ms
Execution time : 293.713 ms