explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4PWv

Settings
# exclusive inclusive rows x rows loops node
1. 0.039 116.039 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.29..8,420.31 rows=2 width=598) (actual time=45.057..116.039 rows=1 loops=1)

2. 0.040 115.999 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.14..8,419.93 rows=2 width=594) (actual time=45.018..115.999 rows=1 loops=1)

  • Join Filter: (tt.code = ai.order_service_code)
  • Rows Removed by Join Filter: 283
3. 0.007 112.643 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.14..8,380.04 rows=2 width=558) (actual time=44.998..112.643 rows=1 loops=1)

4. 0.009 112.634 ↑ 2.0 1 1

Nested Loop Left Join (cost=14.70..8,347.62 rows=2 width=532) (actual time=44.991..112.634 rows=1 loops=1)

5. 0.200 112.622 ↑ 2.0 1 1

Nested Loop Left Join (cost=10.25..8,315.21 rows=2 width=506) (actual time=44.980..112.622 rows=1 loops=1)

  • Join Filter: (ci.region_code = r.code)
  • Rows Removed by Join Filter: 956
6. 0.023 110.449 ↑ 1.0 1 1

Nested Loop Left Join (cost=10.25..8,274.91 rows=1 width=488) (actual time=44.949..110.449 rows=1 loops=1)

7. 0.005 110.377 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.70..8,274.25 rows=1 width=472) (actual time=44.879..110.377 rows=1 loops=1)

8. 0.038 110.353 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.28..8,265.81 rows=1 width=425) (actual time=44.857..110.353 rows=1 loops=1)

  • Join Filter: (co.code = ci.country_code)
  • Rows Removed by Join Filter: 251
9. 0.012 106.229 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.28..8,227.08 rows=1 width=410) (actual time=44.819..106.229 rows=1 loops=1)

10. 0.005 106.129 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.86..8,226.59 rows=1 width=377) (actual time=44.728..106.129 rows=1 loops=1)

11. 0.016 0.016 ↑ 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.013..0.016 rows=1 loops=1)

  • Index Cond: (download_code = 'fd1027b3-96c3-4a87-bc30-1e568bd34bbc'::text)
12. 51.111 106.108 ↑ 1.0 1 1

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

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

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

14. 0.007 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
15. 0.024 0.024 ↑ 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.024..0.024 rows=1 loops=1)

  • Index Cond: (code = ai.payer_contragent_code)
16. 0.088 0.088 ↑ 1.0 1 1

Index Scan using city_code_idx on city ci (cost=0.42..0.48 rows=1 width=36) (actual time=0.081..0.088 rows=1 loops=1)

  • Index Cond: (code = c.city_code)
  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 3
17. 4.086 4.086 ↑ 1.0 252 1

Seq Scan on country co (cost=0.00..35.58 rows=252 width=17) (actual time=0.015..4.086 rows=252 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 754
18. 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.017..0.019 rows=1 loops=1)

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

  • Index Cond: (c.code = contragent_code)
20. 1.973 1.973 ↑ 1.0 957 1

Seq Scan on region r (cost=0.00..28.34 rows=957 width=21) (actual time=0.015..1.973 rows=957 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 270
21. 0.002 0.003 ↓ 0.0 0 1

Bitmap Heap Scan on city rc (cost=4.44..16.20 rows=1 width=31) (actual time=0.003..0.003 rows=0 loops=1)

  • Recheck Cond: (code = ai.receiver_city_code)
  • Filter: (lang = 'rus'::text)
22. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on city_code_idx (cost=0.00..4.44 rows=3 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (code = ai.receiver_city_code)
23. 0.001 0.002 ↓ 0.0 0 1

Bitmap Heap Scan on city sc (cost=4.44..16.20 rows=1 width=31) (actual time=0.002..0.002 rows=0 loops=1)

  • Recheck Cond: (code = ai.sender_city_code)
  • Filter: (lang = 'rus'::text)
24. 0.001 0.001 ↓ 0.0 0 1

Bitmap Index Scan on city_code_idx (cost=0.00..4.44 rows=3 width=0) (actual time=0.001..0.001 rows=0 loops=1)

  • Index Cond: (code = ai.sender_city_code)
25. 0.120 3.316 ↑ 1.0 284 1

Materialize (cost=0.00..31.81 rows=294 width=39) (actual time=0.014..3.316 rows=284 loops=1)

26. 3.196 3.196 ↑ 1.0 284 1

Seq Scan on tariff_type tt (cost=0.00..30.34 rows=294 width=39) (actual time=0.010..3.196 rows=284 loops=1)

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 810
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 : 5.490 ms
Execution time : 116.432 ms