explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IiRL

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

Nested Loop Left Join (cost=115,643.29..121,049.01 rows=2 width=598) (actual time=1,452.002..1,452.007 rows=1 loops=1)

2. 0.023 1,451.973 ↑ 2.0 1 1

Nested Loop Left Join (cost=115,643.14..121,048.63 rows=2 width=594) (actual time=1,451.968..1,451.973 rows=1 loops=1)

3. 6.375 1,451.920 ↑ 2.0 1 1

Hash Right Join (cost=115,642.86..121,032.02 rows=2 width=558) (actual time=1,451.917..1,451.920 rows=1 loops=1)

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

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

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
5. 0.037 1,410.188 ↑ 2.0 1 1

Hash (cost=115,642.84..115,642.84 rows=2 width=532) (actual time=1,410.188..1,410.188 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 6.489 1,410.151 ↑ 2.0 1 1

Hash Right Join (cost=110,253.68..115,642.84 rows=2 width=532) (actual time=1,410.148..1,410.151 rows=1 loops=1)

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

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
8. 0.019 1,368.493 ↑ 2.0 1 1

Hash (cost=110,253.66..110,253.66 rows=2 width=506) (actual time=1,368.492..1,368.493 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.010 1,368.474 ↑ 2.0 1 1

Nested Loop Left Join (cost=8,219.54..110,253.66 rows=2 width=506) (actual time=1,347.052..1,368.474 rows=1 loops=1)

10. 0.008 1,368.447 ↑ 1.0 1 1

Nested Loop Left Join (cost=8,219.26..110,253.35 rows=1 width=488) (actual time=1,347.027..1,368.447 rows=1 loops=1)

11. 0.022 1,368.423 ↑ 1.0 1 1

Nested Loop Left Join (cost=8,218.85..110,244.91 rows=1 width=441) (actual time=1,347.004..1,368.423 rows=1 loops=1)

12. 6.689 1,368.382 ↑ 1.0 1 1

Nested Loop Left Join (cost=8,218.57..110,244.60 rows=1 width=426) (actual time=1,346.963..1,368.382 rows=1 loops=1)

  • Join Filter: (ci.code = c.city_code)
  • Rows Removed by Join Filter: 59915
13. 0.005 1,325.313 ↑ 1.0 1 1

Nested Loop Left Join (cost=8,218.57..104,409.05 rows=1 width=393) (actual time=1,325.306..1,325.313 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.020..0.022 rows=1 loops=1)

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

Hash Right Join (cost=8,218.30..104,400.75 rows=1 width=149) (actual time=1,325.282..1,325.286 rows=1 loops=1)

  • Hash Cond: (p.contragent_code = c.code)
16. 780.230 780.230 ↑ 1.0 2,723,644 1

Seq Scan on phone p (cost=0.00..85,945.50 rows=2,729,850 width=48) (actual time=0.067..780.230 rows=2,723,644 loops=1)

17. 0.010 160.986 ↑ 1.0 1 1

Hash (cost=8,218.29..8,218.29 rows=1 width=133) (actual time=160.986..160.986 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 84.817 160.976 ↑ 1.0 1 1

Hash Right Join (cost=8.59..8,218.29 rows=1 width=133) (actual time=60.014..160.976 rows=1 loops=1)

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

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

20. 0.015 0.043 ↑ 1.0 1 1

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

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

  • Index Cond: (code = ai.payer_contragent_code)
22. 36.380 36.380 ↓ 1.0 59,916 1

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

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 115406
23. 0.019 0.019 ↑ 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.019..0.019 rows=1 loops=1)

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

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

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

  • Index Cond: ((code = ai.order_service_code) AND (lang = 'rus'::text))
27. 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.955 ms
Execution time : 1,452.678 ms