explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kwa

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 80.227 ↑ 1.0 10 1

Limit (cost=1,640.50..1,788.38 rows=10 width=9,391) (actual time=15.393..80.227 rows=10 loops=1)

2. 0.161 80.214 ↑ 1,553.2 10 1

Nested Loop Left Join (cost=1,640.50..231,315.95 rows=15,532 width=9,391) (actual time=15.392..80.214 rows=10 loops=1)

3. 0.361 80.003 ↑ 1,547.7 10 1

Nested Loop Left Join (cost=1,640.07..203,346.90 rows=15,477 width=9,285) (actual time=15.325..80.003 rows=10 loops=1)

4. 0.048 79.552 ↑ 1,542.2 10 1

Nested Loop Left Join (cost=1,639.64..175,477.25 rows=15,422 width=9,179) (actual time=15.262..79.552 rows=10 loops=1)

  • Join Filter: (o.order_additional_status_code = delivery_detail_additional_status.code)
  • Rows Removed by Join Filter: 270
5. 0.036 79.454 ↑ 1,542.2 10 1

Nested Loop Left Join (cost=1,639.50..175,243.56 rows=15,422 width=8,117) (actual time=15.217..79.454 rows=10 loops=1)

6. 0.038 79.348 ↑ 1,542.2 10 1

Nested Loop Left Join (cost=1,639.22..154,872.75 rows=15,422 width=8,044) (actual time=15.194..79.348 rows=10 loops=1)

7. 0.036 79.310 ↑ 1,542.2 10 1

Nested Loop Left Join (cost=1,638.66..112,891.69 rows=15,422 width=6,063) (actual time=15.181..79.310 rows=10 loops=1)

8. 0.050 79.264 ↑ 1,542.2 10 1

Nested Loop Left Join (cost=1,638.09..70,910.63 rows=15,422 width=4,082) (actual time=15.170..79.264 rows=10 loops=1)

  • Join Filter: (o.order_status_code = order_status.code)
  • Rows Removed by Join Filter: 225
9. 70.406 79.094 ↑ 1,542.2 10 1

Bitmap Heap Scan on "order" o (cost=1,637.95..70,675.81 rows=15,422 width=1,981) (actual time=15.123..79.094 rows=10 loops=1)

  • Recheck Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) OR ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) OR ((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text))
  • Filter: ((NOT deleted) AND (date_time_create >= '2019-08-07 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 20100
  • Heap Blocks: exact=18146
10. 0.003 8.688 ↓ 0.0 0 1

BitmapOr (cost=1,637.95..1,637.95 rows=62,333 width=0) (actual time=8.688..8.688 rows=0 loops=1)

11. 4.394 4.394 ↓ 1.1 22,137 1

Bitmap Index Scan on idx_order_sender_code (cost=0.00..529.27 rows=20,481 width=0) (actual time=4.394..4.394 rows=22,137 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
12. 1.922 1.922 ↓ 1.1 22,137 1

Bitmap Index Scan on idx_order_sender_code (cost=0.00..529.27 rows=20,481 width=0) (actual time=1.922..1.922 rows=22,137 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
13. 2.369 2.369 ↓ 1.0 22,256 1

Bitmap Index Scan on idx_order_payer_code (cost=0.00..567.85 rows=21,371 width=0) (actual time=2.369..2.369 rows=22,256 loops=1)

  • Index Cond: ((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
14. 0.029 0.120 ↓ 24.0 24 10

Materialize (cost=0.14..3.49 rows=1 width=2,101) (actual time=0.004..0.012 rows=24 loops=10)

15. 0.041 0.091 ↓ 26.0 26 1

Nested Loop Left Join (cost=0.14..3.49 rows=1 width=2,101) (actual time=0.034..0.091 rows=26 loops=1)

  • Join Filter: (order_status."groupCode" = order_status_group.code)
  • Rows Removed by Join Filter: 29
16. 0.024 0.024 ↓ 26.0 26 1

Index Scan using "idx-order_status-lang" on order_status (cost=0.14..2.36 rows=1 width=1,061) (actual time=0.017..0.024 rows=26 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
17. 0.026 0.026 ↓ 2.0 2 26

Seq Scan on order_status_group (cost=0.00..1.11 rows=1 width=1,040) (actual time=0.001..0.001 rows=2 loops=26)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
18. 0.010 0.010 ↓ 0.0 0 10

Index Scan using "idx-order_id_ek5" on "order" ro (cost=0.56..2.72 rows=1 width=1,981) (actual time=0.001..0.001 rows=0 loops=10)

  • Index Cond: (o.reverse_ek5_id = id_ek5)
19. 0.000 0.000 ↓ 0.0 0 10

Index Scan using "idx-order_id_ek5" on "order" so (cost=0.56..2.72 rows=1 width=1,981) (actual time=0.000..0.000 rows=0 loops=10)

  • Index Cond: (o.straight_ek5_id = id_ek5)
20. 0.070 0.070 ↑ 1.0 1 10

Index Scan using "idx-tariff_type-code-lang" on tariff_type (cost=0.28..1.32 rows=1 width=73) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: ((o.tariff_type_code = code) AND ((lang)::text = 'rus'::text))
21. 0.031 0.050 ↓ 27.0 27 10

Materialize (cost=0.14..2.37 rows=1 width=1,062) (actual time=0.001..0.005 rows=27 loops=10)

22. 0.019 0.019 ↓ 27.0 27 1

Index Scan using "idx-delivery_detail_additional_status-lang" on delivery_detail_additional_status (cost=0.14..2.36 rows=1 width=1,062) (actual time=0.009..0.019 rows=27 loops=1)

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

Index Scan using "idx-city-code-lang" on city rc (cost=0.43..1.81 rows=1 width=106) (actual time=0.009..0.009 rows=1 loops=10)

  • Index Cond: ((code = (((o.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
24. 0.050 0.050 ↑ 1.0 1 10

Index Scan using "idx-city-code-lang" on city sc (cost=0.43..1.81 rows=1 width=106) (actual time=0.005..0.005 rows=1 loops=10)

  • Index Cond: ((code = (((o.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
Planning time : 14.964 ms
Execution time : 80.629 ms