explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CdBk

Settings
# exclusive inclusive rows x rows loops node
1. 2,074.854 2,074.854 ↑ 1.0 1 1

Sort (cost=409,640.81..409,640.81 rows=1 width=1,998) (actual time=2,074.853..2,074.854 rows=1 loops=1)

  • Sort Key: stock.sa_blocked, (CASE WHEN ((stock.location_blockreason)::text <> 'NONE'::text) THEN stock.location_blockreason ELSE NULL::character varying END) DESC, (CASE WHEN ((stock.stock_blockreason)::text <> 'NONE'::text) THEN stock.stock_blockreason ELSE NULL::character varying END) DESC, ((SubPlan 14)), ((SubPlan 15)), (CASE WHEN (((SubPlan 21) > '0'::numeric) AND ((SubPlan 22) = 0) AND ((SubPlan 23) = 0)) THEN (SubPlan 24) ELSE NULL::numeric END) DESC, (CASE WHEN ((COALESCE(othermovements.other_movement_stock_alloc_qty, '0'::numeric) > '0'::numeric) AND ((SubPlan 25) = 0) AND ((SubPlan 26) = 0)) THEN COALESCE(othermovements.other_movement_stock_alloc_qty, '0'::numeric) ELSE NULL::numeric END) DESC, ((SubPlan 20)), ((stock.location_handlingtype & '4'::bigint)), stock.stock_proddate, ((SubPlan 12)) DESC, ((SubPlan 13)) DESC, stock.in_transport DESC, stock.sa_sequence, stock.sa_positionindex, stock.sa_outbound_workload, (CASE WHEN (stock.sa_outbound_workload <= '10'::numeric) THEN 1 WHEN (stock.sa_outbound_workload <= '20'::numeric) THEN 2 WHEN (stock.sa_outbound_workload <= '30'::numeric) THEN 3 WHEN (stock.sa_outbound_workload > '30'::numeric) THEN 4 ELSE NULL::integer END), stock.stock_quantity
  • Sort Method: quicksort Memory: 25kB
2.          

CTE cte_recursive_source_subareas

3. 0.055 0.907 ↑ 6.8 85 1

Recursive Union (cost=4.11..501.92 rows=581 width=587) (actual time=0.061..0.907 rows=85 loops=1)

4. 0.001 0.060 ↑ 1.0 1 1

Subquery Scan on *SELECT* 1 (cost=4.11..4.14 rows=1 width=94) (actual time=0.059..0.060 rows=1 loops=1)

5. 0.004 0.059 ↑ 1.0 1 1

Group (cost=4.11..4.13 rows=1 width=128) (actual time=0.059..0.059 rows=1 loops=1)

  • Group Key: replensourcesubareas.sourcesubareas_id, sa.id, sam.blackbox, replensourcesubareas.processconfigs_id
6. 0.007 0.055 ↑ 1.0 1 1

Sort (cost=4.11..4.12 rows=1 width=116) (actual time=0.055..0.055 rows=1 loops=1)

  • Sort Key: replensourcesubareas.sourcesubareas_id, sam.blackbox
  • Sort Method: quicksort Memory: 25kB
7. 0.003 0.048 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.68..4.10 rows=1 width=116) (actual time=0.046..0.048 rows=1 loops=1)

8. 0.004 0.038 ↑ 1.0 1 1

Nested Loop (cost=0.41..3.75 rows=1 width=115) (actual time=0.037..0.038 rows=1 loops=1)

9. 0.025 0.025 ↑ 1.0 1 1

Index Only Scan using uk_processconfid_said_seq on wms_processconf_wms_srcsubarea replensourcesubareas (cost=0.14..1.26 rows=1 width=52) (actual time=0.025..0.025 rows=1 loops=1)

  • Index Cond: (processconfigs_id = 'PRC-REPLENISHMENT-GTM-WS07'::text)
  • Heap Fetches: 0
10. 0.009 0.009 ↑ 1.0 1 1

Index Scan using pk_wms_subarea_id on wms_subarea sa (cost=0.27..2.49 rows=1 width=63) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((id)::text = (replensourcesubareas.sourcesubareas_id)::text)
11. 0.007 0.007 ↑ 1.0 1 1

Index Scan using pk_wms_subarea_movecontrol_id on wms_subarea_movementcontrol sam (cost=0.27..0.34 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: ((id)::text = (sa.id)::text)
12. 0.189 0.792 ↑ 2.8 21 4

Hash Right Join (cost=42.10..48.62 rows=58 width=587) (actual time=0.151..0.198 rows=21 loops=4)

  • Hash Cond: ((sam_1.id)::text = (sa_1.id)::text)
13. 0.099 0.099 ↑ 1.0 163 3

Seq Scan on wms_subarea_movementcontrol sam_1 (cost=0.00..4.63 rows=163 width=27) (actual time=0.003..0.033 rows=163 loops=3)

14. 0.052 0.504 ↑ 2.8 21 4

Hash (cost=41.38..41.38 rows=58 width=603) (actual time=0.126..0.126 rows=21 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
15. 0.096 0.452 ↑ 2.8 21 4

Nested Loop (cost=0.27..41.38 rows=58 width=603) (actual time=0.080..0.113 rows=21 loops=4)

16. 0.016 0.016 ↓ 2.1 21 4

WorkTable Scan on cte_recursive_source_subareas rsa (cost=0.00..0.20 rows=10 width=630) (actual time=0.000..0.004 rows=21 loops=4)

17. 0.340 0.340 ↑ 6.0 1 85

Index Scan using i_subarea_parent_id on wms_subarea sa_1 (cost=0.27..4.06 rows=6 width=63) (actual time=0.003..0.004 rows=1 loops=85)

  • Index Cond: ((parent_id)::text = (rsa.id)::text)
18.          

CTE cte_subarea_workload

19. 1.025 2,057.412 ↑ 4.1 29 1

HashAggregate (cost=87,294.29..87,295.49 rows=120 width=25) (actual time=2,057.402..2,057.412 rows=29 loops=1)

  • Group Key: locsa.subareas_id
20. 6.961 2,056.387 ↑ 22.8 2,791 1

Hash Join (cost=72,162.56..86,975.78 rows=63,701 width=54) (actual time=1,850.363..2,056.387 rows=2,791 loops=1)

  • Hash Cond: ((ins.id)::text = (movement.id)::text)
21. 200.284 200.284 ↓ 1.0 17,368 1

Seq Scan on wms_instruction ins (cost=0.00..14,682.65 rows=17,057 width=37) (actual time=0.009..200.284 rows=17,368 loops=1)

  • Filter: (status >= 6)
  • Rows Removed by Filter: 569
22. 1.221 1,849.142 ↑ 23.4 2,791 1

Hash (cost=71,345.99..71,345.99 rows=65,326 width=54) (actual time=1,849.142..1,849.142 rows=2,791 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 757kB
23. 5.229 1,847.921 ↑ 23.4 2,791 1

Hash Join (cost=58,469.79..71,345.99 rows=65,326 width=54) (actual time=1,786.342..1,847.921 rows=2,791 loops=1)

  • Hash Cond: ((locsa.subareas_id)::text = (secsub.subarea_id)::text)
24. 15.412 1,842.412 ↑ 5.1 22,644 1

Hash Join (cost=58,449.29..67,653.82 rows=114,987 width=54) (actual time=1,785.580..1,842.412 rows=22,644 loops=1)

  • Hash Cond: ((movement.grouptransportunit_id)::text = (sk.id)::text)
25. 43.902 43.902 ↑ 11.9 12,327 1

Seq Scan on wms_instruction_movement movement (cost=0.00..7,503.40 rows=147,000 width=74) (actual time=0.015..43.902 rows=12,327 loops=1)

  • Filter: (((type)::text = 'PUT'::text) AND ((controltype)::text = 'MOVE_TO_LOCATION'::text))
  • Rows Removed by Filter: 2641
26. 89.452 1,783.098 ↑ 1.7 164,010 1

Hash (cost=54,864.51..54,864.51 rows=286,783 width=34) (actual time=1,783.098..1,783.098 rows=164,010 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 18712kB
27. 581.833 1,693.646 ↑ 1.7 164,010 1

Merge Join (cost=2,291.45..54,864.51 rows=286,783 width=34) (actual time=384.831..1,693.646 rows=164,010 loops=1)

  • Merge Cond: ((sk.parent_id)::text = (locsa.locations_id)::text)
28. 395.599 395.599 ↑ 5.2 70,648 1

Index Scan using i_stockkeepable_parent_id on wms_stockkeepable sk (cost=0.42..59,361.42 rows=366,623 width=43) (actual time=0.018..395.599 rows=70,648 loops=1)

29. 716.214 716.214 ↑ 1.1 1,075,866 1

Index Scan using i_location_wms_subarea_loc_id on wms_location_wms_subarea locsa (cost=0.43..37,540.41 rows=1,163,846 width=29) (actual time=0.009..716.214 rows=1,075,866 loops=1)

30. 0.140 0.280 ↑ 1.0 431 1

Hash (cost=15.11..15.11 rows=431 width=29) (actual time=0.280..0.280 rows=431 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
31. 0.140 0.140 ↑ 1.0 431 1

Seq Scan on mfc_section_subarea secsub (cost=0.00..15.11 rows=431 width=29) (actual time=0.008..0.140 rows=431 loops=1)

  • Filter: (subarea_id IS NOT NULL)
  • Rows Removed by Filter: 80
32.          

CTE cte_source_subareas

33. 0.255 2,059.178 ↑ 2.4 85 1

HashAggregate (cost=112.58..115.08 rows=200 width=752) (actual time=2,059.112..2,059.178 rows=85 loops=1)

  • Group Key: rsa_1.id, rsa_1.parent_id, rsa_1.recursive_level, rsa_1.blocked, rsa_1.blackbox, rsa_1.sequence, rsa_1.positionindex, rsa_1.replenconfig_id
34. 0.087 2,058.923 ↑ 3.5 164 1

Hash Left Join (cost=22.78..98.06 rows=581 width=753) (actual time=2,058.526..2,058.923 rows=164 loops=1)

  • Hash Cond: ((rsa_1.id)::text = (sawl.sa_id)::text)
35. 0.122 1.373 ↑ 3.5 164 1

Hash Right Join (cost=18.88..88.49 rows=581 width=745) (actual time=1.052..1.373 rows=164 loops=1)

  • Hash Cond: ((childsa.parent_id)::text = (rsa_1.id)::text)
36. 0.222 0.222 ↑ 1.0 171 1

Seq Scan on wms_subarea childsa (cost=0.00..52.71 rows=171 width=47) (actual time=0.005..0.222 rows=171 loops=1)

37. 0.039 1.029 ↑ 6.8 85 1

Hash (cost=11.62..11.62 rows=581 width=720) (actual time=1.029..1.029 rows=85 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 20kB
38. 0.990 0.990 ↑ 6.8 85 1

CTE Scan on cte_recursive_source_subareas rsa_1 (cost=0.00..11.62 rows=581 width=720) (actual time=0.062..0.990 rows=85 loops=1)

39. 0.031 2,057.463 ↑ 4.1 29 1

Hash (cost=2.40..2.40 rows=120 width=98) (actual time=2,057.463..2,057.463 rows=29 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
40. 2,057.432 2,057.432 ↑ 4.1 29 1

CTE Scan on cte_subarea_workload sawl (cost=0.00..2.40 rows=120 width=98) (actual time=2,057.406..2,057.432 rows=29 loops=1)

41.          

CTE cte_recursive_stockkeepables

42. 0.016 1.726 ↑ 33.7 3 1

Recursive Union (cost=3.32..413.60 rows=101 width=1,559) (actual time=0.960..1.726 rows=3 loops=1)

43. 0.012 1.014 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.32..9.47 rows=1 width=811) (actual time=0.956..1.014 rows=1 loops=1)

44. 0.011 0.955 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.92..9.03 rows=1 width=732) (actual time=0.898..0.955 rows=1 loops=1)

45. 0.010 0.663 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.50..8.57 rows=1 width=720) (actual time=0.607..0.663 rows=1 loops=1)

46. 0.008 0.570 ↑ 1.0 1 1

Nested Loop (cost=2.08..8.12 rows=1 width=683) (actual time=0.515..0.570 rows=1 loops=1)

47. 0.008 0.523 ↑ 1.0 1 1

Nested Loop (cost=1.66..6.77 rows=1 width=658) (actual time=0.471..0.523 rows=1 loops=1)

48. 0.072 0.435 ↑ 1.0 1 1

Nested Loop (cost=1.24..5.81 rows=1 width=41) (actual time=0.384..0.435 rows=1 loops=1)

  • Join Filter: ((replenap.article_id)::text = (replena.id)::text)
49. 0.007 0.285 ↑ 1.0 1 1

Nested Loop (cost=0.83..5.28 rows=1 width=115) (actual time=0.236..0.285 rows=1 loops=1)

50. 0.083 0.083 ↑ 1.0 1 1

Index Scan using pk_articlepackage_id on wms_articlepackage replenap (cost=0.41..2.63 rows=1 width=41) (actual time=0.083..0.083 rows=1 loops=1)

  • Index Cond: ((id)::text = '0c9e2dc3-dec0-44e6-afab-e27ddf91a81f'::text)
51. 0.195 0.195 ↑ 1.0 1 1

Index Scan using i_articlepackage_article_id on wms_articlepackage stockap (cost=0.41..2.64 rows=1 width=78) (actual time=0.148..0.195 rows=1 loops=1)

  • Index Cond: ((article_id)::text = (replenap.article_id)::text)
  • Filter: (replenap.quantity = quantity)
52. 0.078 0.078 ↑ 1.0 1 1

Index Only Scan using pk_wms_article_id on wms_article replena (cost=0.41..0.52 rows=1 width=37) (actual time=0.078..0.078 rows=1 loops=1)

  • Index Cond: (id = (stockap.article_id)::text)
  • Heap Fetches: 0
53. 0.080 0.080 ↑ 2.0 1 1

Index Scan using i_stock_articlepackage_id on wms_stock stock_1 (cost=0.41..0.94 rows=2 width=654) (actual time=0.079..0.080 rows=1 loops=1)

  • Index Cond: ((articlepackage_id)::text = (stockap.id)::text)
54. 0.039 0.039 ↑ 1.0 1 1

Index Scan using pk_wms_stockkeepable_id on wms_stockkeepable sk_1 (cost=0.42..1.34 rows=1 width=60) (actual time=0.038..0.039 rows=1 loops=1)

  • Index Cond: ((id)::text = (stock_1.stockkeepable_id)::text)
55. 0.083 0.083 ↑ 1.0 1 1

Index Only Scan using pk_transportunit_id on wms_transportunit tu (cost=0.42..0.44 rows=1 width=37) (actual time=0.082..0.083 rows=1 loops=1)

  • Index Cond: (id = (sk_1.id)::text)
  • Heap Fetches: 1
56. 0.281 0.281 ↓ 0.0 0 1

Index Only Scan using pk_wms_location_id on wms_location loc (cost=0.42..0.45 rows=1 width=12) (actual time=0.281..0.281 rows=0 loops=1)

  • Index Cond: (id = (sk_1.id)::text)
  • Heap Fetches: 0
57. 0.047 0.047 ↓ 0.0 0 1

Index Only Scan using pk_carrier_id on wms_carrier car (cost=0.40..0.43 rows=1 width=36) (actual time=0.047..0.047 rows=0 loops=1)

  • Index Cond: (id = (sk_1.id)::text)
  • Heap Fetches: 0
58. 0.012 0.696 ↑ 10.0 1 3

Nested Loop Left Join (cost=1.67..40.21 rows=10 width=1,559) (actual time=0.206..0.232 rows=1 loops=3)

59. 0.014 0.354 ↑ 10.0 1 3

Nested Loop Left Join (cost=1.26..35.85 rows=10 width=1,625) (actual time=0.107..0.118 rows=1 loops=3)

60. 0.016 0.246 ↑ 10.0 1 3

Nested Loop Left Join (cost=0.84..31.24 rows=10 width=1,613) (actual time=0.071..0.082 rows=1 loops=3)

61. 0.012 0.114 ↑ 10.0 1 3

Nested Loop (cost=0.42..26.70 rows=10 width=1,576) (actual time=0.028..0.038 rows=1 loops=3)

62. 0.006 0.006 ↑ 10.0 1 3

WorkTable Scan on cte_recursive_stockkeepables rsk (cost=0.00..0.20 rows=10 width=1,606) (actual time=0.001..0.002 rows=1 loops=3)

63. 0.096 0.096 ↑ 1.0 1 3

Index Scan using pk_wms_stockkeepable_id on wms_stockkeepable sk_2 (cost=0.42..2.64 rows=1 width=60) (actual time=0.023..0.032 rows=1 loops=3)

  • Index Cond: ((id)::text = (rsk.sk_parent_id)::text)
64. 0.116 0.116 ↑ 1.0 1 2

Index Only Scan using pk_transportunit_id on wms_transportunit tu_1 (cost=0.42..0.44 rows=1 width=37) (actual time=0.057..0.058 rows=1 loops=2)

  • Index Cond: (id = (sk_2.id)::text)
  • Heap Fetches: 1
65. 0.094 0.094 ↓ 0.0 0 2

Index Only Scan using pk_wms_location_id on wms_location loc_1 (cost=0.42..0.45 rows=1 width=12) (actual time=0.047..0.047 rows=0 loops=2)

  • Index Cond: (id = (sk_2.id)::text)
  • Heap Fetches: 0
66. 0.330 0.330 ↑ 1.0 1 2

Index Only Scan using pk_carrier_id on wms_carrier car_1 (cost=0.40..0.43 rows=1 width=36) (actual time=0.142..0.165 rows=1 loops=2)

  • Index Cond: (id = (sk_2.id)::text)
  • Heap Fetches: 3
67.          

CTE cte_recursive_transportunit

68. 0.010 0.857 ↑ 5,485.2 6 1

Recursive Union (cost=270.18..316,802.72 rows=32,911 width=165) (actual time=0.338..0.857 rows=6 loops=1)

69. 0.014 0.381 ↑ 50.5 2 1

HashAggregate (cost=270.18..1,098.22 rows=101 width=165) (actual time=0.336..0.381 rows=2 loops=1)

  • Group Key: sk_3.id, rsk_1.stock_id
70. 0.006 0.043 ↑ 33.7 3 1

Nested Loop (cost=0.42..269.67 rows=101 width=133) (actual time=0.019..0.043 rows=3 loops=1)

71. 0.001 0.001 ↑ 33.7 3 1

CTE Scan on cte_recursive_stockkeepables rsk_1 (cost=0.00..2.02 rows=101 width=180) (actual time=0.001..0.001 rows=3 loops=1)

72. 0.036 0.036 ↑ 1.0 1 3

Index Scan using pk_wms_stockkeepable_id on wms_stockkeepable sk_3 (cost=0.42..2.64 rows=1 width=43) (actual time=0.011..0.012 rows=1 loops=3)

  • Index Cond: ((id)::text = (rsk_1.transportunit_id)::text)
73.          

SubPlan (forHashAggregate)

74. 0.006 0.324 ↑ 1.0 1 2

Aggregate (cost=8.18..8.19 rows=1 width=32) (actual time=0.162..0.162 rows=1 loops=2)

75. 0.002 0.318 ↓ 0.0 0 2

Nested Loop (cost=2.07..8.17 rows=1 width=8) (actual time=0.159..0.159 rows=0 loops=2)

76. 0.003 0.316 ↓ 0.0 0 2

Nested Loop (cost=1.66..7.04 rows=1 width=82) (actual time=0.158..0.158 rows=0 loops=2)

77. 0.007 0.266 ↑ 1.0 1 2

Nested Loop (cost=1.25..6.10 rows=1 width=156) (actual time=0.132..0.133 rows=1 loops=2)

78. 0.007 0.200 ↑ 1.0 1 2

Nested Loop (cost=0.83..5.28 rows=1 width=119) (actual time=0.099..0.100 rows=1 loops=2)

79. 0.150 0.150 ↑ 1.0 1 2

Index Scan using i_insmove_srcsk_type on wms_instruction_movement movementins (cost=0.42..2.64 rows=1 width=37) (actual time=0.075..0.075 rows=1 loops=2)

  • Index Cond: ((sourcestockkeepable_id)::text = (sk_3.id)::text)
  • Filter: (((type)::text <> 'PUT'::text) AND ((controltype)::text <> 'MOVE_TO_LOCATION'::text))
  • Rows Removed by Filter: 1
80. 0.043 0.043 ↑ 1.0 1 1

Index Scan using i_wms_olalloc_id on wms_olalloc allocation (cost=0.41..2.63 rows=1 width=82) (actual time=0.042..0.043 rows=1 loops=1)

  • Index Cond: ((instruction_id)::text = (movementins.id)::text)
81. 0.059 0.059 ↑ 1.0 1 1

Index Only Scan using pk_olalloc_movement_id on wms_olalloc_movement movementallocation (cost=0.41..0.81 rows=1 width=37) (actual time=0.059..0.059 rows=1 loops=1)

  • Index Cond: (id = (allocation.id)::text)
  • Heap Fetches: 1
82. 0.047 0.047 ↓ 0.0 0 1

Index Scan using pk_olalloc_stock_id on wms_olalloc_stock stockallocation (cost=0.41..0.93 rows=1 width=37) (actual time=0.047..0.047 rows=0 loops=1)

  • Index Cond: ((id)::text = (allocation.id)::text)
  • Filter: (stockreserved AND ((stock_id)::text <> (rsk_1.stock_id)::text))
  • Rows Removed by Filter: 1
83. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_wms_instruction_id on wms_instruction ins_1 (cost=0.41..1.12 rows=1 width=37) (never executed)

  • Index Cond: (id = (allocation.instruction_id)::text)
  • Heap Fetches: 0
84. 0.018 0.466 ↑ 1,640.5 2 2

Nested Loop (cost=0.42..31,504.63 rows=3,281 width=165) (actual time=0.127..0.233 rows=2 loops=2)

85. 0.002 0.002 ↑ 336.7 3 2

WorkTable Scan on cte_recursive_transportunit rtu (cost=0.00..20.20 rows=1,010 width=180) (actual time=0.001..0.001 rows=3 loops=2)

86. 0.138 0.138 ↑ 3.0 1 6

Index Scan using i_stockkeepable_parent_id on wms_stockkeepable sk_4 (cost=0.42..4.54 rows=3 width=43) (actual time=0.021..0.023 rows=1 loops=6)

  • Index Cond: ((parent_id)::text = (rtu.tu_id)::text)
87.          

SubPlan (forNested Loop)

88. 0.004 0.308 ↑ 1.0 1 4

Aggregate (cost=8.18..8.19 rows=1 width=32) (actual time=0.077..0.077 rows=1 loops=4)

89. 0.004 0.304 ↓ 0.0 0 4

Nested Loop (cost=2.07..8.17 rows=1 width=8) (actual time=0.076..0.076 rows=0 loops=4)

90. 0.002 0.300 ↓ 0.0 0 4

Nested Loop (cost=1.66..7.04 rows=1 width=82) (actual time=0.075..0.075 rows=0 loops=4)

91. 0.007 0.288 ↓ 0.0 0 4

Nested Loop (cost=1.25..6.10 rows=1 width=156) (actual time=0.071..0.072 rows=0 loops=4)

92. 0.007 0.272 ↓ 0.0 0 4

Nested Loop (cost=0.83..5.28 rows=1 width=119) (actual time=0.068..0.068 rows=0 loops=4)

93. 0.256 0.256 ↓ 0.0 0 4

Index Scan using i_insmove_srcsk_type on wms_instruction_movement movementinstruction (cost=0.42..2.64 rows=1 width=37) (actual time=0.064..0.064 rows=0 loops=4)

  • Index Cond: ((sourcestockkeepable_id)::text = (sk_4.id)::text)
  • Filter: (((type)::text <> 'PUT'::text) AND ((controltype)::text <> 'MOVE_TO_LOCATION'::text))
94. 0.009 0.009 ↑ 1.0 1 1

Index Scan using i_wms_olalloc_id on wms_olalloc allocation_1 (cost=0.41..2.63 rows=1 width=82) (actual time=0.008..0.009 rows=1 loops=1)

  • Index Cond: ((instruction_id)::text = (movementinstruction.id)::text)
95. 0.009 0.009 ↑ 1.0 1 1

Index Only Scan using pk_olalloc_movement_id on wms_olalloc_movement movementallocation_1 (cost=0.41..0.81 rows=1 width=37) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: (id = (allocation_1.id)::text)
  • Heap Fetches: 1
96. 0.010 0.010 ↓ 0.0 0 1

Index Scan using pk_olalloc_stock_id on wms_olalloc_stock stockallocation_1 (cost=0.41..0.93 rows=1 width=37) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: ((id)::text = (allocation_1.id)::text)
  • Filter: (stockreserved AND ((stock_id)::text <> (rtu.stock_id)::text))
  • Rows Removed by Filter: 1
97. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pk_wms_instruction_id on wms_instruction instruction (cost=0.41..1.12 rows=1 width=37) (never executed)

  • Index Cond: (id = (allocation_1.instruction_id)::text)
  • Heap Fetches: 0
98.          

CTE cte_other_movements

99. 0.015 0.879 ↑ 200.0 1 1

HashAggregate (cost=822.78..825.28 rows=200 width=122) (actual time=0.877..0.879 rows=1 loops=1)

  • Group Key: rtu_1.stock_id
100. 0.864 0.864 ↑ 5,485.2 6 1

CTE Scan on cte_recursive_transportunit rtu_1 (cost=0.00..658.22 rows=32,911 width=122) (actual time=0.340..0.864 rows=6 loops=1)

101.          

CTE cte_stock

102. 10.166 2,071.881 ↑ 4.0 1 1

Append (cost=171.90..216.03 rows=4 width=1,586) (actual time=2,061.933..2,071.881 rows=1 loops=1)

103. 0.001 2,061.715 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1_1 (cost=171.90..171.98 rows=1 width=1,527) (actual time=2,061.715..2,061.715 rows=0 loops=1)

104. 0.002 2,061.714 ↓ 0.0 0 1

GroupAggregate (cost=171.90..171.97 rows=1 width=1,559) (actual time=2,061.714..2,061.714 rows=0 loops=1)

  • Group Key: rsk_2.transportunit_id, rsk_2.transportunit_type, rsk_2.parent_transportunit_type, loc_2.id, rsk_2.carrier_id, replensourcesubareas_1.sourcesubareas_id, rsk_2.stock_id, rsk_2.stock_blockreason, rsk_2.stock_quantity, rsk_2.stock_gendate, rsk_2.stock_expdate, rsk_2.stock_proddate, rsk_2.stock_lotcode, rsk_2.articlepackage_id, rsk_2.articlepackage_qty
105. 0.023 2,061.712 ↓ 0.0 0 1

Sort (cost=171.90..171.91 rows=1 width=1,523) (actual time=2,061.712..2,061.712 rows=0 loops=1)

  • Sort Key: rsk_2.transportunit_id, rsk_2.transportunit_type, rsk_2.parent_transportunit_type, loc_2.id, rsk_2.carrier_id, replensourcesubareas_1.sourcesubareas_id, rsk_2.stock_id, rsk_2.stock_blockreason, rsk_2.stock_quantity, rsk_2.stock_gendate, rsk_2.stock_expdate, rsk_2.stock_proddate, rsk_2.stock_lotcode, rsk_2.articlepackage_id, rsk_2.articlepackage_qty
  • Sort Method: quicksort Memory: 25kB
106. 0.001 2,061.689 ↓ 0.0 0 1

Nested Loop Left Join (cost=3.72..171.89 rows=1 width=1,523) (actual time=2,061.689..2,061.689 rows=0 loops=1)

  • Filter: (movement_1.id IS NULL)
107. 0.001 2,061.688 ↓ 0.0 0 1

Nested Loop (cost=3.30..169.26 rows=1 width=1,523) (actual time=2,061.688..2,061.688 rows=0 loops=1)

  • Join Filter: ((rsk_2.location_id)::text = (loc_2.id)::text)
108. 0.070 2,061.687 ↓ 0.0 0 1

Nested Loop (cost=2.88..168.80 rows=1 width=1,600) (actual time=2,061.687..2,061.687 rows=0 loops=1)

109. 0.123 2,059.492 ↓ 85.0 85 1

Hash Join (cost=2.45..8.46 rows=1 width=162) (actual time=2,059.185..2,059.492 rows=85 loops=1)

  • Hash Cond: (((rsa_2.replenconfig_id)::text = (replensourcesubareas_1.processconfigs_id)::text) AND (rsa_2.sequence = replensourcesubareas_1.esequence))
110. 2,059.316 2,059.316 ↑ 2.4 85 1

CTE Scan on cte_source_subareas rsa_2 (cost=0.00..4.00 rows=200 width=658) (actual time=2,059.114..2,059.316 rows=85 loops=1)

111. 0.030 0.053 ↑ 1.0 58 1

Hash (cost=1.58..1.58 rows=58 width=52) (actual time=0.053..0.053 rows=58 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
112. 0.023 0.023 ↑ 1.0 58 1

Seq Scan on wms_processconf_wms_srcsubarea replensourcesubareas_1 (cost=0.00..1.58 rows=58 width=52) (actual time=0.008..0.023 rows=58 loops=1)

113. 0.255 2.125 ↓ 0.0 0 85

Nested Loop (cost=0.43..159.33 rows=101 width=1,545) (actual time=0.025..0.025 rows=0 loops=85)

114. 1.870 1.870 ↑ 33.7 3 85

CTE Scan on cte_recursive_stockkeepables rsk_2 (cost=0.00..2.02 rows=101 width=1,516) (actual time=0.012..0.022 rows=3 loops=85)

115. 0.000 0.000 ↓ 0.0 0 255

Index Only Scan using pk_subarea_location_id on wms_location_wms_subarea lsa (cost=0.43..1.55 rows=1 width=29) (actual time=0.000..0.000 rows=0 loops=255)

  • Index Cond: ((subareas_id = (rsa_2.id)::text) AND (locations_id = (rsk_2.location_id)::text))