explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gVYE

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 900.897 ↑ 1.1 83 1

Append (cost=2.83..69,478.52 rows=90 width=1,937) (actual time=0.552..900.897 rows=83 loops=1)

  • Buffers: shared hit=200842
2. 0.024 95.025 ↑ 1.0 30 1

Subquery Scan on *SELECT* 1 (cost=2.83..447.54 rows=30 width=1,937) (actual time=0.551..95.025 rows=30 loops=1)

  • Buffers: shared hit=27254
3. 0.019 95.001 ↑ 1.0 30 1

Limit (cost=2.83..447.24 rows=30 width=1,945) (actual time=0.548..95.001 rows=30 loops=1)

  • Buffers: shared hit=27254
4. 1.623 94.982 ↑ 3,803.1 30 1

Nested Loop Left Join (cost=2.83..1,690,166.49 rows=114,094 width=1,945) (actual time=0.547..94.982 rows=30 loops=1)

  • Buffers: shared hit=27254
5. 0.745 93.269 ↑ 3,789.7 30 1

Nested Loop Left Join (cost=2.40..1,486,783.93 rows=113,692 width=2,425) (actual time=0.422..93.269 rows=30 loops=1)

  • Buffers: shared hit=26983
6. 0.092 92.344 ↑ 3,776.4 30 1

Nested Loop Left Join (cost=1.97..1,286,108.33 rows=113,291 width=2,577) (actual time=0.383..92.344 rows=30 loops=1)

  • Join Filter: (o.order_additional_status_code = delivery_detail_additional_status.code)
  • Rows Removed by Join Filter: 774
  • Buffers: shared hit=26797
7. 0.056 92.162 ↑ 3,776.4 30 1

Nested Loop Left Join (cost=1.97..1,284,405.63 rows=113,291 width=2,061) (actual time=0.337..92.162 rows=30 loops=1)

  • Buffers: shared hit=26795
8. 0.041 91.956 ↑ 3,776.4 30 1

Nested Loop Left Join (cost=1.69..1,134,807.24 rows=113,291 width=2,028) (actual time=0.322..91.956 rows=30 loops=1)

  • Buffers: shared hit=26705
9. 0.071 91.915 ↑ 3,776.4 30 1

Nested Loop Left Join (cost=1.12..855,282.66 rows=113,291 width=2,034) (actual time=0.319..91.915 rows=30 loops=1)

  • Buffers: shared hit=26705
10. 0.212 91.844 ↑ 3,776.4 30 1

Nested Loop Left Join (cost=0.56..575,758.08 rows=113,291 width=2,040) (actual time=0.314..91.844 rows=30 loops=1)

  • Join Filter: (o.order_status_code = order_status.code)
  • Rows Removed by Join Filter: 749
  • Buffers: shared hit=26705
11. 91.422 91.422 ↑ 3,776.4 30 1

Index Scan using idx_order_sender_code_date on "order" o (cost=0.56..574,054.61 rows=113,291 width=1,004) (actual time=0.248..91.422 rows=30 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text)
  • Buffers: shared hit=26677
12. 0.070 0.210 ↓ 26.0 26 30

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

  • Buffers: shared hit=28
13. 0.054 0.140 ↓ 26.0 26 1

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

  • Join Filter: (order_status."groupCode" = order_status_group.code)
  • Rows Removed by Join Filter: 29
  • Buffers: shared hit=28
14. 0.034 0.034 ↓ 26.0 26 1

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

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 52
  • Buffers: shared hit=2
15. 0.052 0.052 ↓ 2.0 2 26

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

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=26
16. 0.000 0.000 ↓ 0.0 0 30

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

  • Index Cond: (o.reverse_ek5_id = id_ek5)
17. 0.000 0.000 ↓ 0.0 0 30

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

  • Index Cond: (o.straight_ek5_id = id_ek5)
18. 0.150 0.150 ↑ 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.005..0.005 rows=1 loops=30)

  • Index Cond: ((o.tariff_type_code = code) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=90
19. 0.059 0.090 ↓ 26.0 26 30

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

  • Buffers: shared hit=2
20. 0.031 0.031 ↓ 27.0 27 1

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

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 80
  • Buffers: shared hit=2
21. 0.180 0.180 ↑ 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.006..0.006 rows=1 loops=30)

  • Index Cond: ((code = (((o.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=120
22. 0.090 0.090 ↑ 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.003..0.003 rows=1 loops=30)

  • Index Cond: ((code = (((o.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=120
23. 0.018 682.031 ↑ 1.3 23 1

Subquery Scan on *SELECT* 2 (cost=2.55..68,478.10 rows=30 width=1,937) (actual time=489.789..682.031 rows=23 loops=1)

  • Buffers: shared hit=144569
24. 0.012 682.013 ↑ 1.3 23 1

Limit (cost=2.55..68,477.80 rows=30 width=1,945) (actual time=489.787..682.013 rows=23 loops=1)

  • Buffers: shared hit=144569
25. 0.546 682.001 ↑ 6.9 23 1

Nested Loop Left Join (cost=2.55..362,921.34 rows=159 width=1,945) (actual time=489.785..682.001 rows=23 loops=1)

  • Buffers: shared hit=144569
26. 0.779 681.363 ↑ 6.9 23 1

Nested Loop Left Join (cost=2.12..362,512.75 rows=158 width=2,425) (actual time=489.742..681.363 rows=23 loops=1)

  • Buffers: shared hit=144477
27. 0.038 680.469 ↑ 6.8 23 1

Nested Loop Left Join (cost=1.69..362,109.51 rows=157 width=2,577) (actual time=489.661..680.469 rows=23 loops=1)

  • Join Filter: (o_1.order_additional_status_code = delivery_detail_additional_status_1.code)
  • Rows Removed by Join Filter: 23
  • Buffers: shared hit=144270
28. 0.228 680.431 ↑ 6.8 23 1

Nested Loop Left Join (cost=1.69..362,103.81 rows=157 width=2,061) (actual time=489.651..680.431 rows=23 loops=1)

  • Join Filter: (o_1.tariff_type_code = tariff_type_1.code)
  • Rows Removed by Join Filter: 2691
  • Buffers: shared hit=144269
29. 0.035 679.996 ↑ 6.8 23 1

Nested Loop Left Join (cost=1.69..361,423.97 rows=157 width=2,028) (actual time=489.547..679.996 rows=23 loops=1)

  • Buffers: shared hit=144263
30. 0.043 679.961 ↑ 6.8 23 1

Nested Loop Left Join (cost=1.12..360,987.51 rows=157 width=2,034) (actual time=489.543..679.961 rows=23 loops=1)

  • Buffers: shared hit=144263
31. 0.115 679.895 ↑ 6.8 23 1

Nested Loop Left Join (cost=0.56..360,551.05 rows=157 width=2,040) (actual time=489.527..679.895 rows=23 loops=1)

  • Join Filter: (o_1.order_status_code = order_status_1.code)
  • Rows Removed by Join Filter: 575
  • Buffers: shared hit=144263
32. 679.642 679.642 ↑ 6.8 23 1

Index Scan using idx_order_receiver_code_date on "order" o_1 (cost=0.56..360,544.59 rows=157 width=1,004) (actual time=489.431..679.642 rows=23 loops=1)

  • Index Cond: ((receiver_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text)
  • Buffers: shared hit=144235
33. 0.062 0.138 ↓ 26.0 26 23

Materialize (cost=0.00..4.11 rows=1 width=1,040) (actual time=0.002..0.006 rows=26 loops=23)

  • Buffers: shared hit=28
34. 0.024 0.076 ↓ 26.0 26 1

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

  • Join Filter: (order_status_1."groupCode" = order_status_group_1.code)
  • Rows Removed by Join Filter: 29
  • Buffers: shared hit=28
35. 0.026 0.026 ↓ 26.0 26 1

Seq Scan on order_status order_status_1 (cost=0.00..2.98 rows=1 width=524) (actual time=0.014..0.026 rows=26 loops=1)

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

Seq Scan on order_status_group order_status_group_1 (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
  • Buffers: shared hit=26
37. 0.023 0.023 ↓ 0.0 0 23

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

  • Index Cond: (o_1.reverse_ek5_id = id_ek5)
38. 0.000 0.000 ↓ 0.0 0 23

Index Scan using "idx-order_id_ek5" on "order" so_1 (cost=0.56..2.78 rows=1 width=26) (actual time=0.000..0.000 rows=0 loops=23)

  • Index Cond: (o_1.straight_ek5_id = id_ek5)
39. 0.132 0.207 ↑ 2.4 118 23

Materialize (cost=0.00..29.99 rows=278 width=41) (actual time=0.001..0.009 rows=118 loops=23)

  • Buffers: shared hit=6
40. 0.075 0.075 ↑ 2.4 118 1

Seq Scan on tariff_type tariff_type_1 (cost=0.00..28.60 rows=278 width=41) (actual time=0.006..0.075 rows=118 loops=1)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 352
  • Buffers: shared hit=6
41. 0.000 0.000 ↓ 2.0 2 23

Materialize (cost=0.00..3.34 rows=1 width=520) (actual time=0.000..0.000 rows=2 loops=23)

  • Buffers: shared hit=1
42. 0.005 0.005 ↓ 2.0 2 1

Seq Scan on delivery_detail_additional_status delivery_detail_additional_status_1 (cost=0.00..3.34 rows=1 width=520) (actual time=0.005..0.005 rows=2 loops=1)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
  • Buffers: shared hit=1
43. 0.115 0.115 ↑ 1.0 1 23

Index Scan using "idx-city-code-lang" on city rc_1 (cost=0.43..2.57 rows=1 width=29) (actual time=0.005..0.005 rows=1 loops=23)

  • Index Cond: ((code = (((o_1.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=92
44. 0.092 0.092 ↑ 1.0 1 23

Index Scan using "idx-city-code-lang" on city sc_1 (cost=0.43..2.57 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=23)

  • Index Cond: ((code = (((o_1.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=92
45. 0.021 123.803 ↑ 1.0 30 1

Subquery Scan on *SELECT* 3 (cost=2.83..552.43 rows=30 width=1,937) (actual time=0.480..123.803 rows=30 loops=1)

  • Buffers: shared hit=29019
46. 0.020 123.782 ↑ 1.0 30 1

Limit (cost=2.83..552.13 rows=30 width=1,945) (actual time=0.478..123.782 rows=30 loops=1)

  • Buffers: shared hit=29019
47. 1.367 123.762 ↑ 2,783.7 30 1

Nested Loop Left Join (cost=2.83..1,529,096.26 rows=83,511 width=1,945) (actual time=0.477..123.762 rows=30 loops=1)

  • Buffers: shared hit=29019
48. 0.708 122.305 ↑ 2,773.9 30 1

Nested Loop Left Join (cost=2.40..1,380,062.06 rows=83,217 width=2,425) (actual time=0.396..122.305 rows=30 loops=1)

  • Buffers: shared hit=28748
49. 0.090 121.447 ↑ 2,764.1 30 1

Nested Loop Left Join (cost=1.97..1,233,008.89 rows=82,924 width=2,577) (actual time=0.365..121.447 rows=30 loops=1)

  • Join Filter: (o_2.order_additional_status_code = delivery_detail_additional_status_2.code)
  • Rows Removed by Join Filter: 774
  • Buffers: shared hit=28562
50. 0.073 121.267 ↑ 2,764.1 30 1

Nested Loop Left Join (cost=1.97..1,231,761.69 rows=82,924 width=2,061) (actual time=0.334..121.267 rows=30 loops=1)

  • Buffers: shared hit=28560
51. 0.052 121.044 ↑ 2,764.1 30 1

Nested Loop Left Join (cost=1.69..1,122,260.42 rows=82,924 width=2,028) (actual time=0.321..121.044 rows=30 loops=1)

  • Buffers: shared hit=28470
52. 0.052 120.992 ↑ 2,764.1 30 1

Nested Loop Left Join (cost=1.12..913,298.30 rows=82,924 width=2,034) (actual time=0.317..120.992 rows=30 loops=1)

  • Buffers: shared hit=28470
53. 0.115 120.910 ↑ 2,764.1 30 1

Nested Loop Left Join (cost=0.56..704,336.18 rows=82,924 width=2,040) (actual time=0.312..120.910 rows=30 loops=1)

  • Join Filter: (o_2.order_status_code = order_status_2.code)
  • Rows Removed by Join Filter: 749
  • Buffers: shared hit=28470
54. 120.615 120.615 ↑ 2,764.1 30 1

Index Scan using idx_order_payer_code_date on "order" o_2 (cost=0.56..703,088.22 rows=82,924 width=1,004) (actual time=0.267..120.615 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) AND ((payer_contragent_code)::text = '4469aa32-bdf8-443f-b4c0-4fe5184c4c3d'::text))
  • Filter: (NOT deleted)
  • Buffers: shared hit=28442
55. 0.082 0.180 ↓ 26.0 26 30

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

  • Buffers: shared hit=28
56. 0.044 0.098 ↓ 26.0 26 1

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

  • Join Filter: (order_status_2."groupCode" = order_status_group_2.code)
  • Rows Removed by Join Filter: 29
  • Buffers: shared hit=28
57. 0.028 0.028 ↓ 26.0 26 1

Seq Scan on order_status order_status_2 (cost=0.00..2.98 rows=1 width=524) (actual time=0.010..0.028 rows=26 loops=1)

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

Seq Scan on order_status_group order_status_group_2 (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
  • Buffers: shared hit=26
59. 0.030 0.030 ↓ 0.0 0 30

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

  • Index Cond: (o_2.reverse_ek5_id = id_ek5)
60. 0.000 0.000 ↓ 0.0 0 30

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

  • Index Cond: (o_2.straight_ek5_id = id_ek5)
61. 0.150 0.150 ↑ 1.0 1 30

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

  • Index Cond: ((o_2.tariff_type_code = code) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=90
62. 0.069 0.090 ↓ 26.0 26 30

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

  • Buffers: shared hit=2
63. 0.021 0.021 ↓ 27.0 27 1

Seq Scan on delivery_detail_additional_status delivery_detail_additional_status_2 (cost=0.00..3.34 rows=1 width=520) (actual time=0.006..0.021 rows=27 loops=1)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 80
  • Buffers: shared hit=2
64. 0.150 0.150 ↑ 1.0 1 30

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

  • Index Cond: ((code = (((o_2.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=120
65. 0.090 0.090 ↑ 1.0 1 30

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

  • Index Cond: ((code = (((o_2.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
  • Buffers: shared hit=120
Planning time : 64.966 ms
Execution time : 901.360 ms