explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pFka

Settings
# exclusive inclusive rows x rows loops node
1. 2.091 32.117 ↑ 1.0 10 1

Limit (cost=55,671.91..55,671.93 rows=10 width=6,377) (actual time=30.028..32.117 rows=10 loops=1)

2. 0.039 30.026 ↑ 510.6 20 1

Sort (cost=55,671.88..55,697.41 rows=10,211 width=6,377) (actual time=30.024..30.026 rows=20 loops=1)

  • Sort Key: o.date_time_create DESC
  • Sort Method: quicksort Memory: 34kB
3. 0.243 29.987 ↑ 444.0 23 1

HashAggregate (cost=55,195.95..55,298.06 rows=10,211 width=6,377) (actual time=29.875..29.987 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 29.744 ↑ 243.1 42 1

Append (cost=1,161.63..54,608.82 rows=10,211 width=6,377) (actual time=3.637..29.744 rows=42 loops=1)

5. 12.877 13.700 ↑ 282.5 18 1

Gather (cost=1,161.63..26,894.94 rows=5,085 width=1,949) (actual time=3.636..13.700 rows=18 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 0.338 0.823 ↑ 353.2 6 3

Nested Loop Left Join (cost=161.63..25,386.44 rows=2,119 width=1,949) (actual time=0.299..0.823 rows=6 loops=3)

7. 0.176 0.482 ↑ 351.8 6 3

Nested Loop Left Join (cost=161.20..21,353.64 rows=2,111 width=2,426) (actual time=0.278..0.482 rows=6 loops=3)

8. 0.000 0.302 ↑ 350.7 6 3

Hash Left Join (cost=160.77..17,371.18 rows=2,104 width=2,577) (actual time=0.256..0.302 rows=6 loops=3)

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

Hash Left Join (cost=158.40..17,363.27 rows=2,104 width=2,061) (actual time=0.240..0.283 rows=6 loops=3)

  • Hash Cond: (o.tariff_type_code = tariff_type.code)
10. 0.007 0.219 ↑ 350.7 6 3

Nested Loop Left Join (cost=131.68..17,330.96 rows=2,104 width=2,028) (actual time=0.179..0.219 rows=6 loops=3)

11. 0.007 0.212 ↑ 350.7 6 3

Nested Loop Left Join (cost=131.12..11,522.64 rows=2,104 width=2,034) (actual time=0.176..0.212 rows=6 loops=3)

12. 0.000 0.205 ↑ 350.7 6 3

Hash Left Join (cost=130.56..5,714.31 rows=2,104 width=2,040) (actual time=0.174..0.205 rows=6 loops=3)

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

Parallel Bitmap Heap Scan on "order" o (cost=127.06..5,702.66 rows=2,104 width=1,004) (actual time=0.141..0.167 rows=6 loops=3)

  • Recheck Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (date_time_create >= '2019-08-06 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.351 0.351 ↑ 280.5 18 1

Bitmap Index Scan on idx_order_sender_test (cost=0.00..125.80 rows=5,049 width=0) (actual time=0.351..0.351 rows=18 loops=1)

  • Index Cond: (((sender_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) AND (date_time_create >= '2019-08-06 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.056 0.077 ↓ 26.0 26 1

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

  • Join Filter: (order_status."groupCode" = order_status_group.code)
  • Rows Removed by Join Filter: 29
17. 0.020 0.020 ↓ 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.011..0.020 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.176 ↑ 1.0 282 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
22. 0.108 0.136 ↑ 1.0 282 1

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

  • Recheck Cond: ((lang)::text = 'rus'::text)
  • Heap Blocks: exact=15
23. 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)
24. 0.009 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
25. 0.029 0.029 ↓ 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.017..0.029 rows=27 loops=1)

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

Index Scan using "idx-city-code-lang" on city rc (cost=0.43..1.89 rows=1 width=29) (actual time=0.004..0.004 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.89 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.050 0.674 ↑ 41.0 1 1

Nested Loop Left Join (cost=29.55..663.58 rows=41 width=1,949) (actual time=0.593..0.674 rows=1 loops=1)

29. 0.069 0.620 ↑ 41.0 1 1

Nested Loop Left Join (cost=29.12..554.11 rows=41 width=2,426) (actual time=0.539..0.620 rows=1 loops=1)

30. 0.013 0.524 ↑ 41.0 1 1

Nested Loop Left Join (cost=28.69..445.36 rows=41 width=2,577) (actual time=0.443..0.524 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.018 0.472 ↑ 41.0 1 1

Hash Left Join (cost=28.54..442.38 rows=41 width=2,061) (actual time=0.391..0.472 rows=1 loops=1)

  • Hash Cond: (o_1.tariff_type_code = tariff_type_1.code)
32. 0.007 0.227 ↑ 41.0 1 1

Nested Loop Left Join (cost=1.83..415.56 rows=41 width=2,028) (actual time=0.147..0.227 rows=1 loops=1)

33. 0.006 0.219 ↑ 41.0 1 1

Nested Loop Left Join (cost=1.27..301.58 rows=41 width=2,034) (actual time=0.140..0.219 rows=1 loops=1)

34. 0.010 0.210 ↑ 41.0 1 1

Nested Loop Left Join (cost=0.71..187.60 rows=41 width=2,040) (actual time=0.130..0.210 rows=1 loops=1)

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

Index Scan using idx_order_receiver_code on "order" o_1 (cost=0.56..183.50 rows=41 width=1,004) (actual time=0.097..0.102 rows=1 loops=1)

  • Index Cond: ((receiver_contragent_code)::text = '56090b33d83467dd84bd15ce'::text)
  • Filter: ((NOT deleted) AND (date_time_create >= '2019-08-06 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.012 0.098 ↓ 26.0 26 1

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

37. 0.042 0.086 ↓ 26.0 26 1

Nested Loop Left Join (cost=0.14..3.49 rows=1 width=1,040) (actual time=0.023..0.086 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.010..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.003..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.055 0.227 ↑ 1.0 282 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
43. 0.140 0.172 ↑ 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.043..0.172 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.031..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.015..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.013..0.026 rows=27 loops=1)

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

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

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

Gather (cost=1,163.83..26,897.14 rows=5,085 width=1,949) (actual time=2.790..17.366 rows=23 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
50. 0.323 0.782 ↑ 264.9 8 3

Nested Loop Left Join (cost=163.83..25,388.64 rows=2,119 width=1,949) (actual time=0.288..0.782 rows=8 loops=3)

51. 0.170 0.456 ↑ 263.9 8 3

Nested Loop Left Join (cost=163.40..21,355.84 rows=2,111 width=2,426) (actual time=0.258..0.456 rows=8 loops=3)

52. 0.000 0.283 ↑ 263.0 8 3

Hash Left Join (cost=162.97..17,373.38 rows=2,104 width=2,577) (actual time=0.244..0.283 rows=8 loops=3)

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

Hash Left Join (cost=160.60..17,365.47 rows=2,104 width=2,061) (actual time=0.231..0.268 rows=8 loops=3)

  • Hash Cond: (o_2.tariff_type_code = tariff_type_2.code)
54. 0.005 0.203 ↑ 263.0 8 3

Nested Loop Left Join (cost=133.88..17,333.16 rows=2,104 width=2,028) (actual time=0.169..0.203 rows=8 loops=3)

55. 0.006 0.198 ↑ 263.0 8 3

Nested Loop Left Join (cost=133.32..11,524.84 rows=2,104 width=2,034) (actual time=0.167..0.198 rows=8 loops=3)

56. 0.000 0.192 ↑ 263.0 8 3

Hash Left Join (cost=132.76..5,716.51 rows=2,104 width=2,040) (actual time=0.164..0.192 rows=8 loops=3)

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

Parallel Bitmap Heap Scan on "order" o_2 (cost=129.26..5,704.86 rows=2,104 width=1,004) (actual time=0.130..0.153 rows=8 loops=3)

  • Recheck Cond: (((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (date_time_create >= '2019-08-06 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.301 0.301 ↑ 219.5 23 1

Bitmap Index Scan on idx_order_payer_test (cost=0.00..128.00 rows=5,049 width=0) (actual time=0.301..0.301 rows=23 loops=1)

  • Index Cond: (((payer_contragent_code)::text = '56090b33d83467dd84bd15ce'::text) AND (deleted = false) AND (date_time_create >= '2019-08-06 00:00:00'::timestamp without time zone) AND (date_time_create <= '2019-09-07 23:59:59'::timestamp without time zone))
59. 0.009 0.089 ↓ 26.0 26 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
60. 0.061 0.080 ↓ 26.0 26 1

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

  • Join Filter: (order_status_2."groupCode" = order_status_group_2.code)
  • Rows Removed by Join Filter: 29
61. 0.018 0.018 ↓ 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.011..0.018 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.039 0.180 ↑ 1.0 282 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 36kB
66. 0.115 0.141 ↑ 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.033..0.141 rows=282 loops=1)

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

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
69. 0.019 0.019 ↓ 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.008..0.019 rows=27 loops=1)

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

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

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

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

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