explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kdGo

Settings
# exclusive inclusive rows x rows loops node
1. 2.390 43.407 ↑ 1.0 10 1

Limit (cost=54,635.13..54,635.15 rows=10 width=6,377) (actual time=41.019..43.407 rows=10 loops=1)

2. 0.033 41.017 ↑ 500.5 20 1

Sort (cost=54,635.10..54,660.13 rows=10,010 width=6,377) (actual time=41.016..41.017 rows=20 loops=1)

  • Sort Key: o.date_time_create DESC
  • Sort Method: quicksort Memory: 34kB
3. 0.249 40.984 ↑ 435.2 23 1

HashAggregate (cost=54,168.54..54,268.64 rows=10,010 width=6,377) (actual time=40.877..40.984 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 40.735 ↑ 238.3 42 1

Append (cost=1,159.01..53,592.96 rows=10,010 width=6,377) (actual time=2.587..40.735 rows=42 loops=1)

5. 21.533 22.273 ↑ 276.9 18 1

Gather (cost=1,159.01..26,393.97 rows=4,985 width=1,949) (actual time=2.587..22.273 rows=18 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.319 0.740 ↑ 346.2 6 3

Nested Loop Left Join (cost=159.01..24,895.47 rows=2,077 width=1,949) (actual time=0.281..0.740 rows=6 loops=3)

7. 0.133 0.418 ↑ 345.0 6 3

Nested Loop Left Join (cost=158.58..20,935.99 rows=2,070 width=2,426) (actual time=0.262..0.418 rows=6 loops=3)

8. 0.000 0.282 ↑ 343.7 6 3

Hash Left Join (cost=158.14..17,028.01 rows=2,062 width=2,577) (actual time=0.248..0.282 rows=6 loops=3)

  • Hash Cond: (o.order_additional_status_code = delivery_detail_additional_status.code)
9. 0.000 0.267 ↑ 343.7 6 3

Hash Left Join (cost=155.77..17,020.22 rows=2,062 width=2,061) (actual time=0.235..0.267 rows=6 loops=3)

  • Hash Cond: (o.tariff_type_code = tariff_type.code)
10. 0.005 0.205 ↑ 343.7 6 3

Nested Loop Left Join (cost=129.06..16,988.01 rows=2,062 width=2,028) (actual time=0.175..0.205 rows=6 loops=3)

11. 0.005 0.200 ↑ 343.7 6 3

Nested Loop Left Join (cost=128.49..11,294.61 rows=2,062 width=2,034) (actual time=0.173..0.200 rows=6 loops=3)

12. 0.000 0.195 ↑ 343.7 6 3

Hash Left Join (cost=127.93..5,601.21 rows=2,062 width=2,040) (actual time=0.171..0.195 rows=6 loops=3)

  • Hash Cond: (o.order_status_code = order_status.code)
13. 0.000 0.159 ↑ 343.7 6 3

Parallel Bitmap Heap Scan on "order" o (cost=124.43..5,589.72 rows=2,062 width=1,004) (actual time=0.139..0.159 rows=6 loops=3)

  • Recheck Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) 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))
  • Filter: (NOT deleted)
  • Heap Blocks: exact=18
14. 0.326 0.326 ↑ 274.9 18 1

Bitmap Index Scan on idx_order_sender_test (cost=0.00..123.20 rows=4,949 width=0) (actual time=0.326..0.326 rows=18 loops=1)

  • Index Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) 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))
15. 0.009 0.086 ↓ 26.0 26 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
16. 0.058 0.077 ↓ 26.0 26 1

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

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

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

  • Index Cond: ((lang)::text = 'rus'::text)
18. 0.001 0.001 ↓ 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
19. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=18)

  • Index Cond: (o.reverse_ek5_id = id_ek5)
20. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=18)

  • Index Cond: (o.straight_ek5_id = id_ek5)
21. 0.040 0.173 ↑ 1.0 282 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
22. 0.111 0.133 ↑ 1.0 282 1

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

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

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

  • Index Cond: ((lang)::text = 'rus'::text)
24. 0.007 0.026 ↓ 27.0 27 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
25. 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=520) (actual time=0.007..0.019 rows=27 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
26. 0.003 0.003 ↑ 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.003..0.003 rows=1 loops=18)

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

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

Nested Loop Left Join (cost=29.55..652.67 rows=40 width=1,949) (actual time=0.611..0.753 rows=1 loops=1)

29. 0.072 0.678 ↑ 40.0 1 1

Nested Loop Left Join (cost=29.12..545.86 rows=40 width=2,426) (actual time=0.536..0.678 rows=1 loops=1)

30. 0.010 0.596 ↑ 40.0 1 1

Nested Loop Left Join (cost=28.69..439.76 rows=40 width=2,577) (actual time=0.454..0.596 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.015 0.547 ↑ 40.0 1 1

Hash Left Join (cost=28.54..436.80 rows=40 width=2,061) (actual time=0.405..0.547 rows=1 loops=1)

  • Hash Cond: (o_1.tariff_type_code = tariff_type_1.code)
32. 0.006 0.263 ↑ 40.0 1 1

Nested Loop Left Join (cost=1.83..409.98 rows=40 width=2,028) (actual time=0.122..0.263 rows=1 loops=1)

33. 0.006 0.256 ↑ 40.0 1 1

Nested Loop Left Join (cost=1.27..298.78 rows=40 width=2,034) (actual time=0.115..0.256 rows=1 loops=1)

34. 0.011 0.248 ↑ 40.0 1 1

Nested Loop Left Join (cost=0.71..187.58 rows=40 width=2,040) (actual time=0.108..0.248 rows=1 loops=1)

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

Index Scan using idx_order_receiver_code on "order" o_1 (cost=0.56..183.50 rows=40 width=1,004) (actual time=0.074..0.081 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.156 ↓ 26.0 26 1

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

37. 0.067 0.142 ↓ 26.0 26 1

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

  • Join Filter: (order_status_1."groupCode" = order_status_group_1.code)
  • Rows Removed by Join Filter: 29
38. 0.023 0.023 ↓ 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.010..0.023 rows=26 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
39. 0.052 0.052 ↓ 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.002..0.002 rows=2 loops=26)

  • Filter: ((lang)::text = 'rus'::text)
  • Rows Removed by Filter: 3
40. 0.002 0.002 ↓ 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.002 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.064 0.269 ↑ 1.0 282 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
43. 0.173 0.205 ↑ 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.051..0.205 rows=282 loops=1)

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

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

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

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

46. 0.026 0.026 ↓ 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.011..0.026 rows=27 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
47. 0.010 0.010 ↑ 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.010..0.010 rows=1 loops=1)

  • Index Cond: ((code = (((o_1.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
48. 0.006 0.006 ↑ 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.006..0.006 rows=1 loops=1)

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

Gather (cost=1,161.21..26,396.17 rows=4,985 width=1,949) (actual time=3.962..20.037 rows=23 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
50. 0.492 1.131 ↑ 259.6 8 3

Nested Loop Left Join (cost=161.21..24,897.67 rows=2,077 width=1,949) (actual time=0.396..1.131 rows=8 loops=3)

51. 0.240 0.635 ↑ 258.8 8 3

Nested Loop Left Join (cost=160.78..20,938.19 rows=2,070 width=2,426) (actual time=0.353..0.635 rows=8 loops=3)

52. 0.000 0.390 ↑ 257.8 8 3

Hash Left Join (cost=160.34..17,030.21 rows=2,062 width=2,577) (actual time=0.332..0.390 rows=8 loops=3)

  • Hash Cond: (o_2.order_additional_status_code = delivery_detail_additional_status_2.code)
53. 0.000 0.368 ↑ 257.8 8 3

Hash Left Join (cost=157.97..17,022.42 rows=2,062 width=2,061) (actual time=0.313..0.368 rows=8 loops=3)

  • Hash Cond: (o_2.tariff_type_code = tariff_type_2.code)
54. 0.007 0.275 ↑ 257.8 8 3

Nested Loop Left Join (cost=131.26..16,990.21 rows=2,062 width=2,028) (actual time=0.225..0.275 rows=8 loops=3)

55. 0.009 0.268 ↑ 257.8 8 3

Nested Loop Left Join (cost=130.69..11,296.81 rows=2,062 width=2,034) (actual time=0.223..0.268 rows=8 loops=3)

56. 0.000 0.259 ↑ 257.8 8 3

Hash Left Join (cost=130.13..5,603.41 rows=2,062 width=2,040) (actual time=0.220..0.259 rows=8 loops=3)

  • Hash Cond: (o_2.order_status_code = order_status_2.code)
57. 0.000 0.209 ↑ 257.8 8 3

Parallel Bitmap Heap Scan on "order" o_2 (cost=126.63..5,591.92 rows=2,062 width=1,004) (actual time=0.177..0.209 rows=8 loops=3)

  • Recheck Cond: (((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) 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))
  • Filter: (NOT deleted)
  • Heap Blocks: exact=23
58. 0.396 0.396 ↑ 215.2 23 1

Bitmap Index Scan on idx_order_payer_test (cost=0.00..125.40 rows=4,949 width=0) (actual time=0.396..0.396 rows=23 loops=1)

  • Index Cond: (((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) 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))
59. 0.011 0.113 ↓ 26.0 26 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
60. 0.078 0.102 ↓ 26.0 26 1

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

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

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.012..0.023 rows=26 loops=1)

  • Index Cond: ((lang)::text = 'rus'::text)
62. 0.001 0.001 ↓ 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
63. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=23)

  • Index Cond: (o_2.reverse_ek5_id = id_ek5)
64. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=23)

  • Index Cond: (o_2.straight_ek5_id = id_ek5)
65. 0.058 0.251 ↑ 1.0 282 1

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

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

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

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

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

  • Index Cond: ((lang)::text = 'rus'::text)
68. 0.012 0.038 ↓ 27.0 27 1

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

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

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

  • Index Cond: ((lang)::text = 'rus'::text)
70. 0.005 0.005 ↑ 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.005..0.005 rows=1 loops=23)

  • Index Cond: ((code = (((o_2.receiver)::json #>> '{address,cityCode}'::text[]))::integer) AND ((lang)::text = 'rus'::text))
71. 0.004 0.004 ↑ 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.004..0.004 rows=1 loops=23)

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