explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6WQk

Settings
# exclusive inclusive rows x rows loops node
1. 0.021 105.992 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.29..8,412.17 rows=2 width=598) (actual time=43.443..105.992 rows=1 loops=1)

2. 0.040 105.971 ↑ 2.0 1 1

Nested Loop Left Join (cost=19.14..8,411.79 rows=2 width=594) (actual time=43.423..105.971 rows=1 loops=1)

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

Nested Loop Left Join (cost=19.14..8,371.90 rows=2 width=558) (actual time=43.391..105.581 rows=1 loops=1)

4. 0.008 105.556 ↑ 2.0 1 1

Nested Loop Left Join (cost=14.70..8,339.48 rows=2 width=532) (actual time=43.367..105.556 rows=1 loops=1)

5. 0.119 105.545 ↑ 2.0 1 1

Nested Loop Left Join (cost=10.25..8,307.07 rows=2 width=506) (actual time=43.357..105.545 rows=1 loops=1)

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

Nested Loop Left Join (cost=10.25..8,266.77 rows=1 width=488) (actual time=43.329..105.099 rows=1 loops=1)

7. 0.011 105.076 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.70..8,266.11 rows=1 width=472) (actual time=43.307..105.076 rows=1 loops=1)

8. 0.044 105.048 ↑ 1.0 1 1

Nested Loop Left Join (cost=9.28..8,257.67 rows=1 width=425) (actual time=43.280..105.048 rows=1 loops=1)

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

Nested Loop Left Join (cost=9.28..8,218.94 rows=1 width=410) (actual time=43.233..104.745 rows=1 loops=1)

10. 0.008 104.676 ↑ 1.0 1 1

Nested Loop Left Join (cost=8.86..8,218.45 rows=1 width=377) (actual time=43.167..104.676 rows=1 loops=1)

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

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

Hash Right Join (cost=8.59..8,210.15 rows=1 width=133) (actual time=43.136..104.641 rows=1 loops=1)

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

Seq Scan on contract con (cost=0.00..7,104.49 rows=292,549 width=41) (actual time=0.338..52.936 rows=292,549 loops=1)

14. 0.007 0.035 ↑ 1.0 1 1

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

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

  • Index Cond: (code = ai.payer_contragent_code)
16. 0.059 0.059 ↑ 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.057..0.059 rows=1 loops=1)

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

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

  • Filter: (lang = 'rus'::text)
  • Rows Removed by Filter: 754
18. 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))
19. 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)
20. 0.327 0.327 ↑ 1.0 957 1

Seq Scan on region r (cost=0.00..28.34 rows=957 width=21) (actual time=0.014..0.327 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.020 0.020 ↓ 0.0 0 1

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

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

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

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

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

26. 0.279 0.279 ↑ 1.0 284 1

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

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