explain.depesz.com

PostgreSQL's explain analyze made readable

Result: U8Ra

Settings
# exclusive inclusive rows x rows loops node
1. 2.053 118.369 ↑ 1.0 10 1

Limit (cost=78,538.13..78,538.15 rows=10 width=6,377) (actual time=116.314..118.369 rows=10 loops=1)

2. 0.027 116.316 ↑ 491.8 20 1

Sort (cost=78,538.10..78,562.69 rows=9,835 width=6,377) (actual time=116.311..116.316 rows=20 loops=1)

  • Sort Key: o.date_time_create DESC
  • Sort Method: quicksort Memory: 34kB
3. 0.245 116.289 ↑ 427.6 23 1

HashAggregate (cost=78,079.70..78,178.05 rows=9,835 width=6,377) (actual time=116.210..116.289 rows=23 loops=1)

  • Group Key: o.date_time_create, (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. 0.000 116.044 ↑ 234.2 42 1

Append (cost=1,543.88..77,514.18 rows=9,835 width=6,377) (actual time=21.803..116.044 rows=42 loops=1)

5. 25.073 64.740 ↑ 272.1 18 1

Gather (cost=1,543.88..38,356.99 rows=4,898 width=1,949) (actual time=21.801..64.740 rows=18 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
6. 0.529 39.667 ↑ 395.0 4 4

Nested Loop Left Join (cost=543.88..36,867.19 rows=1,580 width=1,949) (actual time=26.575..39.667 rows=4 loops=4)

7. 0.360 39.130 ↑ 393.8 4 4

Nested Loop Left Join (cost=543.44..33,851.16 rows=1,575 width=2,426) (actual time=26.300..39.130 rows=4 loops=4)

8. 0.031 38.759 ↑ 392.2 4 4

Hash Left Join (cost=543.01..30,874.17 rows=1,569 width=2,577) (actual time=26.107..38.759 rows=4 loops=4)

  • Hash Cond: (o.order_additional_status_code = delivery_detail_additional_status.code)
9. 0.036 38.686 ↑ 392.2 4 4

Hash Left Join (cost=540.64..30,867.67 rows=1,569 width=2,061) (actual time=26.041..38.686 rows=4 loops=4)

  • Hash Cond: (o.tariff_type_code = tariff_type.code)
10. 0.017 38.400 ↑ 392.2 4 4

Nested Loop Left Join (cost=513.93..30,836.77 rows=1,569 width=2,028) (actual time=25.763..38.400 rows=4 loops=4)

11. 0.026 38.381 ↑ 392.2 4 4

Nested Loop Left Join (cost=513.36..26,504.05 rows=1,569 width=2,034) (actual time=25.753..38.381 rows=4 loops=4)

12. 0.156 38.353 ↑ 392.2 4 4

Hash Left Join (cost=512.80..22,171.32 rows=1,569 width=2,040) (actual time=25.740..38.353 rows=4 loops=4)

  • Hash Cond: (o.order_status_code = order_status.code)
13. 29.826 38.023 ↑ 392.2 4 4

Parallel Bitmap Heap Scan on "order" o (cost=509.30..22,161.74 rows=1,569 width=1,004) (actual time=25.423..38.023 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=7159
14. 8.197 8.197 ↓ 1.1 22,140 1

Bitmap Index Scan on idx_order_sender_code (cost=0.00..508.09 rows=19,710 width=0) (actual time=8.197..8.197 rows=22,140 loops=1)

  • Index Cond: ((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
15. 0.022 0.174 ↓ 26.0 26 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
16. 0.099 0.152 ↓ 26.0 26 4

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

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

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

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

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

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

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

  • Index Cond: (o.reverse_ek5_id = id_ek5)
20. 0.002 0.002 ↓ 0.0 0 18

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

  • Index Cond: (o.straight_ek5_id = id_ek5)
21. 0.071 0.250 ↑ 1.0 282 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
22. 0.137 0.179 ↑ 1.0 282 4

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

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
25. 0.029 0.029 ↓ 27.0 27 4

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.018..0.029 rows=27 loops=4)

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

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

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

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

  • Index Cond: ((code = (((o.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
28. 0.061 0.678 ↑ 39.0 1 1

Nested Loop Left Join (cost=29.55..638.38 rows=39 width=1,949) (actual time=0.592..0.678 rows=1 loops=1)

29. 0.059 0.612 ↑ 39.0 1 1

Nested Loop Left Join (cost=29.12..534.25 rows=39 width=2,426) (actual time=0.526..0.612 rows=1 loops=1)

30. 0.006 0.544 ↑ 39.0 1 1

Nested Loop Left Join (cost=28.69..430.81 rows=39 width=2,577) (actual time=0.459..0.544 rows=1 loops=1)

  • Join Filter: (o_1.order_additional_status_code = delivery_detail_additional_status_1.code)
  • Rows Removed by Join Filter: 27
31. 0.016 0.469 ↑ 39.0 1 1

Hash Left Join (cost=28.54..427.86 rows=39 width=2,061) (actual time=0.383..0.469 rows=1 loops=1)

  • Hash Cond: (o_1.tariff_type_code = tariff_type_1.code)
32. 0.003 0.244 ↑ 39.0 1 1

Nested Loop Left Join (cost=1.83..401.04 rows=39 width=2,028) (actual time=0.160..0.244 rows=1 loops=1)

33. 0.004 0.240 ↑ 39.0 1 1

Nested Loop Left Join (cost=1.27..292.62 rows=39 width=2,034) (actual time=0.155..0.240 rows=1 loops=1)

34. 0.009 0.233 ↑ 39.0 1 1

Nested Loop Left Join (cost=0.71..184.20 rows=39 width=2,040) (actual time=0.149..0.233 rows=1 loops=1)

  • Join Filter: (o_1.order_status_code = order_status_1.code)
  • Rows Removed by Join Filter: 25
35. 0.115 0.115 ↑ 39.0 1 1

Index Scan using idx_order_receiver_code on "order" o_1 (cost=0.56..180.13 rows=39 width=1,004) (actual time=0.112..0.115 rows=1 loops=1)

  • Index Cond: ((receiver_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: 11
36. 0.014 0.109 ↓ 26.0 26 1

Materialize (cost=0.14..3.49 rows=1 width=1,040) (actual time=0.031..0.109 rows=26 loops=1)

37. 0.051 0.095 ↓ 26.0 26 1

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

  • Join Filter: (order_status_1."groupCode" = order_status_group_1.code)
  • Rows Removed by Join Filter: 29
38. 0.018 0.018 ↓ 26.0 26 1

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.011..0.018 rows=26 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
39. 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
40. 0.003 0.003 ↓ 0.0 0 1

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

  • Index Cond: (o_1.reverse_ek5_id = id_ek5)
41. 0.001 0.001 ↓ 0.0 0 1

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

  • Index Cond: (o_1.straight_ek5_id = id_ek5)
42. 0.059 0.209 ↑ 1.0 282 1

Hash (cost=23.19..23.19 rows=282 width=41) (actual time=0.209..0.209 rows=282 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
43. 0.122 0.150 ↑ 1.0 282 1

Bitmap Heap Scan on tariff_type tariff_type_1 (cost=4.66..23.19 rows=282 width=41) (actual time=0.036..0.150 rows=282 loops=1)

  • Recheck Cond: ((lang)::text = 'rus'::text)
  • Heap Blocks: exact=15
44. 0.028 0.028 ↑ 1.0 282 1

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

  • Index Cond: ((lang)::text = 'rus'::text)
45. 0.052 0.069 ↓ 27.0 27 1

Materialize (cost=0.14..2.37 rows=1 width=520) (actual time=0.009..0.069 rows=27 loops=1)

46. 0.017 0.017 ↓ 27.0 27 1

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.008..0.017 rows=27 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
47. 0.009 0.009 ↑ 1.0 1 1

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

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

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

  • Index Cond: ((code = (((o_1.sender)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
49. 14.904 52.619 ↑ 213.0 23 1

Gather (cost=1,558.18..38,371.29 rows=4,898 width=1,949) (actual time=22.033..52.619 rows=23 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
50. 0.742 37.715 ↑ 263.3 6 4

Nested Loop Left Join (cost=558.18..36,881.49 rows=1,580 width=1,949) (actual time=17.663..37.715 rows=6 loops=4)

51. 0.448 36.966 ↑ 262.5 6 4

Nested Loop Left Join (cost=557.74..33,865.46 rows=1,575 width=2,426) (actual time=17.204..36.966 rows=6 loops=4)

52. 0.043 36.509 ↑ 261.5 6 4

Hash Left Join (cost=557.31..30,888.47 rows=1,569 width=2,577) (actual time=16.942..36.509 rows=6 loops=4)

  • Hash Cond: (o_2.order_additional_status_code = delivery_detail_additional_status_2.code)
53. 0.060 36.388 ↑ 261.5 6 4

Hash Left Join (cost=554.94..30,881.97 rows=1,569 width=2,061) (actual time=16.828..36.388 rows=6 loops=4)

  • Hash Cond: (o_2.tariff_type_code = tariff_type_2.code)
54. 0.020 35.882 ↑ 261.5 6 4

Nested Loop Left Join (cost=528.23..30,851.07 rows=1,569 width=2,028) (actual time=16.330..35.882 rows=6 loops=4)

55. 0.031 35.860 ↑ 261.5 6 4

Nested Loop Left Join (cost=527.66..26,518.35 rows=1,569 width=2,034) (actual time=16.315..35.860 rows=6 loops=4)

56. 0.200 35.826 ↑ 261.5 6 4

Hash Left Join (cost=527.10..22,185.62 rows=1,569 width=2,040) (actual time=16.295..35.826 rows=6 loops=4)

  • Hash Cond: (o_2.order_status_code = order_status_2.code)
57. 26.889 35.348 ↑ 261.5 6 4

Parallel Bitmap Heap Scan on "order" o_2 (cost=523.60..22,176.04 rows=1,569 width=1,004) (actual time=15.828..35.348 rows=6 loops=4)

  • 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: 5559
  • Heap Blocks: exact=5483
58. 8.459 8.459 ↓ 1.1 22,259 1

Bitmap Index Scan on idx_order_payer_code (cost=0.00..522.39 rows=19,710 width=0) (actual time=8.459..8.459 rows=22,259 loops=1)

  • Index Cond: ((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
59. 0.035 0.278 ↓ 26.0 26 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
60. 0.163 0.243 ↓ 26.0 26 4

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

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

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.063..0.077 rows=26 loops=4)

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

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

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

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

  • Index Cond: (o_2.reverse_ek5_id = id_ek5)
64. 0.002 0.002 ↓ 0.0 0 23

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

  • Index Cond: (o_2.straight_ek5_id = id_ek5)
65. 0.173 0.446 ↑ 1.0 282 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
66. 0.198 0.273 ↑ 1.0 282 4

Bitmap Heap Scan on tariff_type tariff_type_2 (cost=4.66..23.19 rows=282 width=41) (actual time=0.090..0.273 rows=282 loops=4)

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

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

  • Index Cond: ((lang)::text = 'rus'::text)
68. 0.022 0.078 ↓ 27.0 27 4

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
69. 0.056 0.056 ↓ 27.0 27 4

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.040..0.056 rows=27 loops=4)

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

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

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

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

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