explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fBeH

Settings
# exclusive inclusive rows x rows loops node
1. 2.116 104.980 ↑ 1.0 10 1

Limit (cost=121,017.16..121,017.18 rows=10 width=6,369) (actual time=102.865..104.980 rows=10 loops=1)

2. 0.048 102.864 ↑ 1,555.6 10 1

Sort (cost=121,017.16..121,056.05 rows=15,556 width=6,369) (actual time=102.863..102.864 rows=10 loops=1)

  • Sort Key: (to_char(o.date_time_create, 'DD.MM.YYYY'::text)) DESC
  • Sort Method: top-N heapsort Memory: 31kB
3. 0.000 102.816 ↑ 676.3 23 1

HashAggregate (cost=120,369.88..120,525.44 rows=15,556 width=6,369) (actual time=102.636..102.816 rows=23 loops=1)

  • Group Key: (to_char(o.date_time_create, 'DD.MM.YYYY'::text)), (''::text), (''::text), rc.name, sc.name, (((o.online_shop)::json ->> 'numberDeparture'::text)), o.number, (((o.packages)::json #>> '{0,description}'::text[])), o.payer_contragent_code, o.sender_contragent_code, o.receiver_contragent_code, ro.number, o.order_status_code, order_status.name, o.order_additional_status_code, delivery_detail_additional_status.name, order_status."groupCode", order_status_group.name, so.number, tariff_type.name, o.order_type_code, tariff_type.urgency
4. 21.076 104.497 ↑ 263.7 59 1

Gather (cost=1,565.22..119,514.30 rows=15,556 width=6,369) (actual time=26.337..104.497 rows=59 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
5. 0.000 83.421 ↑ 1,037.1 15 4

Parallel Append (cost=565.22..116,958.70 rows=15,556 width=6,369) (actual time=15.588..83.421 rows=15 loops=4)

6. 1.009 51.530 ↑ 143.4 12 2

Nested Loop Left Join (cost=603.86..40,012.83 rows=1,721 width=1,941) (actual time=12.930..51.530 rows=12 loops=2)

7. 0.584 50.516 ↑ 142.9 12 2

Nested Loop Left Join (cost=603.43..36,749.88 rows=1,715 width=2,425) (actual time=12.608..50.516 rows=12 loops=2)

8. 0.040 49.924 ↑ 142.3 12 2

Hash Left Join (cost=603.00..33,530.24 rows=1,708 width=2,575) (actual time=12.497..49.924 rows=12 loops=2)

  • Hash Cond: (o.order_additional_status_code = delivery_detail_additional_status.code)
9. 0.040 49.841 ↑ 142.3 12 2

Hash Left Join (cost=600.62..33,523.37 rows=1,708 width=2,059) (actual time=12.430..49.841 rows=12 loops=2)

  • Hash Cond: (o.tariff_type_code = tariff_type.code)
10. 0.030 49.473 ↑ 142.3 12 2

Nested Loop Left Join (cost=573.91..33,492.11 rows=1,708 width=2,026) (actual time=12.081..49.473 rows=12 loops=2)

11. 0.047 49.442 ↑ 142.3 12 2

Nested Loop Left Join (cost=573.35..28,778.63 rows=1,708 width=2,032) (actual time=12.071..49.442 rows=12 loops=2)

12. 0.147 49.394 ↑ 142.3 12 2

Hash Left Join (cost=572.79..24,065.16 rows=1,708 width=2,038) (actual time=12.060..49.394 rows=12 loops=2)

  • Hash Cond: (o.order_status_code = order_status.code)
13. 41.544 49.106 ↑ 142.3 12 2

Parallel Bitmap Heap Scan on "order" o (cost=569.29..24,055.04 rows=1,708 width=1,002) (actual time=11.801..49.106 rows=12 loops=2)

  • Recheck Cond: ((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: 11116
14. 7.562 7.562 ↓ 1.0 22,256 1

Bitmap Index Scan on idx_order_payer_code (cost=0.00..567.97 rows=21,387 width=0) (actual time=7.562..7.562 rows=22,256 loops=1)

  • Index Cond: ((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
15. 0.019 0.141 ↓ 26.0 26 2

Hash (cost=3.49..3.49 rows=1 width=1,040) (actual time=0.141..0.141 rows=26 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
16. 0.092 0.122 ↓ 26.0 26 2

Nested Loop Left Join (cost=0.14..3.49 rows=1 width=1,040) (actual time=0.051..0.122 rows=26 loops=2)

  • Join Filter: (order_status."groupCode" = order_status_group.code)
  • Rows Removed by Join Filter: 29
17. 0.028 0.028 ↓ 26.0 26 2

Index Scan using "idx-order_status-lang" on order_status (cost=0.14..2.36 rows=1 width=524) (actual time=0.020..0.028 rows=26 loops=2)

  • Index Cond: ((lang)::text = 'rus'::text)
18. 0.002 0.002 ↓ 2.0 2 52

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

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
19. 0.001 0.001 ↓ 0.0 0 23

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

  • Index Cond: (o.reverse_ek5_id = id_ek5)
20. 0.001 0.001 ↓ 0.0 0 23

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

  • Index Cond: (o.straight_ek5_id = id_ek5)
21. 0.124 0.328 ↑ 1.0 282 2

Hash (cost=23.19..23.19 rows=282 width=41) (actual time=0.328..0.328 rows=282 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
22. 0.151 0.204 ↑ 1.0 282 2

Bitmap Heap Scan on tariff_type (cost=4.66..23.19 rows=282 width=41) (actual time=0.066..0.204 rows=282 loops=2)

  • Recheck Cond: ((lang)::text = 'rus'::text)
23. 0.053 0.053 ↑ 1.0 282 2

Bitmap Index Scan on "idx-tariff_type-lang" (cost=0.00..4.59 rows=282 width=0) (actual time=0.053..0.053 rows=282 loops=2)

  • Index Cond: ((lang)::text = 'rus'::text)
24. 0.015 0.043 ↓ 27.0 27 2

Hash (cost=2.36..2.36 rows=1 width=520) (actual time=0.043..0.043 rows=27 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
25. 0.028 0.028 ↓ 27.0 27 2

Index Scan using "idx-delivery_detail_additional_status-lang" on delivery_detail_additional_status (cost=0.14..2.36 rows=1 width=520) (actual time=0.014..0.028 rows=27 loops=2)

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

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

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

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

  • Index Cond: ((code = (((o.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
28. 0.421 30.396 ↑ 412.2 4 4

Nested Loop Left Join (cost=565.22..38,356.27 rows=1,649 width=1,941) (actual time=13.363..30.396 rows=4 loops=4)

29. 0.271 29.968 ↑ 410.8 4 4

Nested Loop Left Join (cost=564.79..35,221.82 rows=1,643 width=2,425) (actual time=13.221..29.968 rows=4 loops=4)

30. 0.026 29.689 ↑ 409.2 4 4

Hash Left Join (cost=564.36..32,127.57 rows=1,637 width=2,575) (actual time=13.116..29.689 rows=4 loops=4)

  • Hash Cond: (o_1.order_additional_status_code = delivery_detail_additional_status_1.code)
31. 0.034 29.623 ↑ 409.2 4 4

Hash Left Join (cost=561.99..32,120.89 rows=1,637 width=2,059) (actual time=13.055..29.623 rows=4 loops=4)

  • Hash Cond: (o_1.tariff_type_code = tariff_type_1.code)
32. 0.017 29.344 ↑ 409.2 4 4

Nested Loop Left Join (cost=535.27..32,089.81 rows=1,637 width=2,026) (actual time=12.789..29.344 rows=4 loops=4)

33. 0.027 29.326 ↑ 409.2 4 4

Nested Loop Left Join (cost=534.71..27,570.89 rows=1,637 width=2,032) (actual time=12.779..29.326 rows=4 loops=4)

34. 0.074 29.297 ↑ 409.2 4 4

Hash Left Join (cost=534.15..23,051.96 rows=1,637 width=2,038) (actual time=12.766..29.297 rows=4 loops=4)

  • Hash Cond: (o_1.order_status_code = order_status_1.code)
35. 21.960 29.075 ↑ 409.2 4 4

Parallel Bitmap Heap Scan on "order" o_1 (cost=530.65..23,042.11 rows=1,637 width=1,002) (actual time=12.555..29.075 rows=4 loops=4)

  • Recheck Cond: ((sender_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: 5530
  • Heap Blocks: exact=5836
36. 7.115 7.115 ↓ 1.1 22,137 1

Bitmap Index Scan on idx_order_sender_code (cost=0.00..529.38 rows=20,496 width=0) (actual time=7.115..7.115 rows=22,137 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
37. 0.033 0.148 ↓ 26.0 26 4

Hash (cost=3.49..3.49 rows=1 width=1,040) (actual time=0.147..0.148 rows=26 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
38. 0.079 0.115 ↓ 26.0 26 4

Nested Loop Left Join (cost=0.14..3.49 rows=1 width=1,040) (actual time=0.043..0.115 rows=26 loops=4)

  • Join Filter: (order_status_1."groupCode" = order_status_group_1.code)
  • Rows Removed by Join Filter: 29
39. 0.034 0.034 ↓ 26.0 26 4

Index Scan using "idx-order_status-lang" on order_status order_status_1 (cost=0.14..2.36 rows=1 width=524) (actual time=0.023..0.034 rows=26 loops=4)

  • Index Cond: ((lang)::text = 'rus'::text)
40. 0.002 0.002 ↓ 2.0 2 104

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

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

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

  • Index Cond: (o_1.reverse_ek5_id = id_ek5)
42. 0.001 0.001 ↓ 0.0 0 18

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

  • Index Cond: (o_1.straight_ek5_id = id_ek5)
43. 0.076 0.245 ↑ 1.0 282 4

Hash (cost=23.19..23.19 rows=282 width=41) (actual time=0.245..0.245 rows=282 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
44. 0.130 0.169 ↑ 1.0 282 4

Bitmap Heap Scan on tariff_type tariff_type_1 (cost=4.66..23.19 rows=282 width=41) (actual time=0.049..0.169 rows=282 loops=4)

  • Recheck Cond: ((lang)::text = 'rus'::text)
  • Heap Blocks: exact=15
45. 0.039 0.039 ↑ 1.0 282 4

Bitmap Index Scan on "idx-tariff_type-lang" (cost=0.00..4.59 rows=282 width=0) (actual time=0.039..0.039 rows=282 loops=4)

  • Index Cond: ((lang)::text = 'rus'::text)
46. 0.013 0.040 ↓ 27.0 27 4

Hash (cost=2.36..2.36 rows=1 width=520) (actual time=0.040..0.040 rows=27 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
47. 0.027 0.027 ↓ 27.0 27 4

Index Scan using "idx-delivery_detail_additional_status-lang" on delivery_detail_additional_status delivery_detail_additional_status_1 (cost=0.14..2.36 rows=1 width=520) (actual time=0.015..0.027 rows=27 loops=4)

  • Index Cond: ((lang)::text = 'rus'::text)
48. 0.008 0.008 ↑ 1.0 1 18

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

  • Index Cond: ((code = (((o_1.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
49. 0.007 0.007 ↑ 1.0 1 18

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

  • Index Cond: ((code = (((o_1.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
50. 0.846 54.497 ↑ 183.2 9 2

Nested Loop Left Join (cost=565.22..38,356.27 rows=1,649 width=1,941) (actual time=13.649..54.497 rows=9 loops=2)

51. 0.583 53.644 ↑ 182.6 9 2

Nested Loop Left Join (cost=564.79..35,221.82 rows=1,643 width=2,425) (actual time=13.390..53.644 rows=9 loops=2)

52. 0.031 53.054 ↑ 181.9 9 2

Hash Left Join (cost=564.36..32,127.57 rows=1,637 width=2,575) (actual time=13.197..53.054 rows=9 loops=2)

  • Hash Cond: (o_2.order_additional_status_code = delivery_detail_additional_status_2.code)
53. 0.031 52.981 ↑ 181.9 9 2

Hash Left Join (cost=561.99..32,120.89 rows=1,637 width=2,059) (actual time=13.135..52.981 rows=9 loops=2)

  • Hash Cond: (o_2.tariff_type_code = tariff_type_2.code)
54. 0.022 52.679 ↑ 181.9 9 2

Nested Loop Left Join (cost=535.27..32,089.81 rows=1,637 width=2,026) (actual time=12.848..52.679 rows=9 loops=2)

55. 0.038 52.656 ↑ 181.9 9 2

Nested Loop Left Join (cost=534.71..27,570.89 rows=1,637 width=2,032) (actual time=12.840..52.656 rows=9 loops=2)

56. 0.141 52.617 ↑ 181.9 9 2

Hash Left Join (cost=534.15..23,051.96 rows=1,637 width=2,038) (actual time=12.830..52.617 rows=9 loops=2)

  • Hash Cond: (o_2.order_status_code = order_status_2.code)
57. 43.933 52.314 ↑ 181.9 9 2

Parallel Bitmap Heap Scan on "order" o_2 (cost=530.65..23,042.11 rows=1,637 width=1,002) (actual time=12.549..52.314 rows=9 loops=2)

  • Recheck Cond: ((sender_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: 11060
  • Heap Blocks: exact=10290
58. 8.381 8.381 ↓ 1.1 22,137 1

Bitmap Index Scan on idx_order_sender_code (cost=0.00..529.38 rows=20,496 width=0) (actual time=8.381..8.381 rows=22,137 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
59. 0.018 0.162 ↓ 26.0 26 2

Hash (cost=3.49..3.49 rows=1 width=1,040) (actual time=0.161..0.162 rows=26 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
60. 0.093 0.144 ↓ 26.0 26 2

Nested Loop Left Join (cost=0.14..3.49 rows=1 width=1,040) (actual time=0.065..0.144 rows=26 loops=2)

  • Join Filter: (order_status_2."groupCode" = order_status_group_2.code)
  • Rows Removed by Join Filter: 29
61. 0.049 0.049 ↓ 26.0 26 2

Index Scan using "idx-order_status-lang" on order_status order_status_2 (cost=0.14..2.36 rows=1 width=524) (actual time=0.040..0.049 rows=26 loops=2)

  • Index Cond: ((lang)::text = 'rus'::text)
62. 0.002 0.002 ↓ 2.0 2 52

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

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

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

  • Index Cond: (o_2.reverse_ek5_id = id_ek5)
64. 0.001 0.001 ↓ 0.0 0 18

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

  • Index Cond: (o_2.straight_ek5_id = id_ek5)
65. 0.078 0.271 ↑ 1.0 282 2

Hash (cost=23.19..23.19 rows=282 width=41) (actual time=0.271..0.271 rows=282 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
66. 0.155 0.193 ↑ 1.0 282 2

Bitmap Heap Scan on tariff_type tariff_type_2 (cost=4.66..23.19 rows=282 width=41) (actual time=0.049..0.193 rows=282 loops=2)

  • Recheck Cond: ((lang)::text = 'rus'::text)
  • Heap Blocks: exact=15
67. 0.038 0.038 ↑ 1.0 282 2

Bitmap Index Scan on "idx-tariff_type-lang" (cost=0.00..4.59 rows=282 width=0) (actual time=0.037..0.038 rows=282 loops=2)

  • Index Cond: ((lang)::text = 'rus'::text)
68. 0.015 0.042 ↓ 27.0 27 2

Hash (cost=2.36..2.36 rows=1 width=520) (actual time=0.042..0.042 rows=27 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
69. 0.027 0.027 ↓ 27.0 27 2

Index Scan using "idx-delivery_detail_additional_status-lang" on delivery_detail_additional_status delivery_detail_additional_status_2 (cost=0.14..2.36 rows=1 width=520) (actual time=0.013..0.027 rows=27 loops=2)

  • Index Cond: ((lang)::text = 'rus'::text)
70. 0.007 0.007 ↑ 1.0 1 18

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

  • Index Cond: ((code = (((o_2.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
71. 0.007 0.007 ↑ 1.0 1 18

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

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