explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bBNR

Settings
# exclusive inclusive rows x rows loops node
1. 0.108 81,494.586 ↑ 1.0 30 1

Limit (cost=2.71..2,423.82 rows=30 width=1,945) (actual time=7.666..81,494.586 rows=30 loops=1)

2. 21.743 81,494.478 ↑ 7,178.7 30 1

Nested Loop Left Join (cost=2.71..17,380,393.65 rows=215,360 width=1,945) (actual time=7.648..81,494.478 rows=30 loops=1)

3. 9.335 81,472.375 ↑ 7,153.4 30 1

Nested Loop Left Join (cost=2.27..16,997,046.23 rows=214,603 width=2,423) (actual time=7.532..81,472.375 rows=30 loops=1)

4. 0.301 81,459.110 ↑ 7,128.3 30 1

Nested Loop Left Join (cost=1.84..16,618,801.27 rows=213,849 width=2,575) (actual time=7.123..81,459.110 rows=30 loops=1)

  • Join Filter: (o.order_additional_status_code = delivery_detail_additional_status.code)
  • Rows Removed by Join Filter: 774
5. 0.240 81,458.599 ↑ 7,128.3 30 1

Nested Loop Left Join (cost=1.84..16,615,590.19 rows=213,849 width=2,059) (actual time=7.064..81,458.599 rows=30 loops=1)

6. 0.172 81,457.399 ↑ 7,128.3 30 1

Nested Loop Left Join (cost=1.56..16,333,211.51 rows=213,849 width=2,026) (actual time=7.035..81,457.399 rows=30 loops=1)

7. 0.268 81,457.197 ↑ 7,128.3 30 1

Nested Loop Left Join (cost=1.00..15,821,113.39 rows=213,849 width=2,032) (actual time=7.031..81,457.197 rows=30 loops=1)

8. 0.516 81,456.869 ↑ 7,128.3 30 1

Nested Loop Left Join (cost=0.44..15,309,015.27 rows=213,849 width=2,038) (actual time=7.026..81,456.869 rows=30 loops=1)

  • Join Filter: (o.order_status_code = order_status.code)
  • Rows Removed by Join Filter: 749
9. 81,456.053 81,456.053 ↑ 7,128.3 30 1

Index Scan using idx_order_date_time_create_date_desc on "order" o (cost=0.44..15,305,803.44 rows=213,849 width=1,002) (actual time=6.966..81,456.053 rows=30 loops=1)

  • Index Cond: ((date_time_create >= '2019-03-05 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
  • Filter: ((NOT deleted) AND (((sender_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text) OR ((receiver_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text) OR ((payer_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text)))
  • Rows Removed by Filter: 746522
10. 0.189 0.300 ↓ 26.0 26 30

Materialize (cost=0.00..4.11 rows=1 width=1,040) (actual time=0.003..0.010 rows=26 loops=30)

11. 0.046 0.111 ↓ 26.0 26 1

Nested Loop Left Join (cost=0.00..4.10 rows=1 width=1,040) (actual time=0.031..0.111 rows=26 loops=1)

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

Seq Scan on order_status (cost=0.00..2.98 rows=1 width=524) (actual time=0.015..0.039 rows=26 loops=1)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 52
13. 0.026 0.026 ↓ 2.0 2 26

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

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
14. 0.060 0.060 ↓ 0.0 0 30

Index Scan using "idx-order_id_ek5" on "order" ro (cost=0.56..2.39 rows=1 width=26) (actual time=0.002..0.002 rows=0 loops=30)

  • Index Cond: (o.reverse_ek5_id = id_ek5)
15. 0.030 0.030 ↓ 0.0 0 30

Index Scan using "idx-order_id_ek5" on "order" so (cost=0.56..2.39 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=30)

  • Index Cond: (o.straight_ek5_id = id_ek5)
16. 0.960 0.960 ↑ 1.0 1 30

Index Scan using "idx-tariff_type-code-lang" on tariff_type (cost=0.28..1.32 rows=1 width=41) (actual time=0.032..0.032 rows=1 loops=30)

  • Index Cond: ((o.tariff_type_code = code) AND ((lang)::text = 'rus'::text))
17. 0.172 0.210 ↓ 26.0 26 30

Materialize (cost=0.00..3.34 rows=1 width=520) (actual time=0.001..0.007 rows=26 loops=30)

18. 0.038 0.038 ↓ 27.0 27 1

Seq Scan on delivery_detail_additional_status (cost=0.00..3.34 rows=1 width=520) (actual time=0.012..0.038 rows=27 loops=1)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 80
19. 3.930 3.930 ↑ 1.0 1 30

Index Scan using "idx-city-code-lang" on city rc (cost=0.43..1.77 rows=1 width=29) (actual time=0.131..0.131 rows=1 loops=30)

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

Index Scan using "idx-city-code-lang" on city sc (cost=0.43..1.77 rows=1 width=29) (actual time=0.012..0.012 rows=1 loops=30)

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