explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8zEj

Settings
# exclusive inclusive rows x rows loops node
1. 11.088 3,517.203 ↓ 76.9 1,077 1

Merge Left Join (cost=374,281.06..374,292.85 rows=14 width=737) (actual time=3,504.738..3,517.203 rows=1,077 loops=1)

  • Merge Cond: (co.idcmdout = co_1.idcmdout)
2.          

Initplan (for Merge Left Join)

3. 0.021 0.021 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars (cost=0.15..2.37 rows=1 width=4) (actual time=0.021..0.021 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
4. 0.035 0.035 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_1 (cost=0.15..2.37 rows=1 width=8) (actual time=0.034..0.035 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
5. 0.584 487.451 ↓ 76.9 1,077 1

Merge Left Join (cost=11,371.61..11,376.01 rows=14 width=375) (actual time=486.673..487.451 rows=1,077 loops=1)

  • Merge Cond: (co.idcmdout = prodf_ordersfaze_2.idcmdout)
6. 1.525 485.323 ↓ 76.9 1,077 1

Sort (cost=10,713.81..10,713.85 rows=14 width=343) (actual time=485.135..485.323 rows=1,077 loops=1)

  • Sort Key: co.idcmdout
  • Sort Method: quicksort Memory: 595kB
7. 0.487 483.798 ↓ 76.9 1,077 1

Hash Left Join (cost=10,420.35..10,713.55 rows=14 width=343) (actual time=454.157..483.798 rows=1,077 loops=1)

  • Hash Cond: (co.idcmdout = fb.idcmdout)
8. 0.384 476.039 ↓ 76.9 1,077 1

Hash Left Join (cost=9,565.82..9,858.98 rows=14 width=311) (actual time=446.839..476.039 rows=1,077 loops=1)

  • Hash Cond: (co.idcmdout = fbp.idcmdout)
9. 0.401 475.597 ↓ 76.9 1,077 1

Hash Left Join (cost=8,727.45..9,020.57 rows=14 width=279) (actual time=446.741..475.597 rows=1,077 loops=1)

  • Hash Cond: (co.idcmdout = pd.idcmdout)
10. 0.488 475.155 ↓ 76.9 1,077 1

Hash Left Join (cost=8,721.23..9,014.32 rows=14 width=215) (actual time=446.684..475.155 rows=1,077 loops=1)

  • Hash Cond: (co.idcmdout = p.idcmdout)
11. 104.815 474.597 ↓ 76.9 1,077 1

Merge Semi Join (cost=8,717.47..9,010.52 rows=14 width=183) (actual time=446.593..474.597 rows=1,077 loops=1)

  • Merge Cond: (yweek(date(co.cmdoutdataprod)) = (prodf_planif_selweeks.yw)::text)
12. 6.950 369.724 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=5.86..134,024.18 rows=8,903 width=183) (actual time=26.752..369.724 rows=17,505 loops=1)

  • Join Filter: (co.idcmdout = pp.idcmdout)
13. 4.386 362.774 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=2.27..133,352.74 rows=8,903 width=151) (actual time=26.710..362.774 rows=17,505 loops=1)

14. 15.258 323.378 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=2.12..131,811.47 rows=8,903 width=136) (actual time=26.698..323.378 rows=17,505 loops=1)

15. 1.267 290.615 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=1.98..130,410.08 rows=8,903 width=123) (actual time=26.685..290.615 rows=17,505 loops=1)

16. 8.672 236.833 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=1.56..116,414.97 rows=8,903 width=106) (actual time=26.668..236.833 rows=17,505 loops=1)

17. 13.819 193.151 ↓ 2.0 17,505 1

Nested Loop Left Join (cost=1.14..105,745.85 rows=8,903 width=83) (actual time=26.638..193.151 rows=17,505 loops=1)

18. 6.402 144.322 ↓ 2.0 17,505 1

Nested Loop (cost=0.71..94,008.70 rows=8,903 width=76) (actual time=26.613..144.322 rows=17,505 loops=1)

19. 102.910 102.910 ↓ 2.0 17,505 1

Index Scan using idxcmdout_yweekcmdoutdataprod on comenzi_out co (cost=0.43..90,107.89 rows=8,903 width=45) (actual time=26.580..102.910 rows=17,505 loops=1)

  • Filter: ((prod_type)::text ~~ ($1)::text)
  • Rows Removed by Filter: 101,329
20. 35.010 35.010 ↑ 1.0 1 17,505

Index Scan using idxart_idart on articole a (cost=0.29..0.44 rows=1 width=35) (actual time=0.002..0.002 rows=1 loops=17,505)

  • Index Cond: (idart = co.artid)
21. 35.010 35.010 ↑ 1.0 1 17,505

Index Scan using idxcmdinf_cmdid on comenzi_info cio (cost=0.42..1.31 rows=1 width=11) (actual time=0.002..0.002 rows=1 loops=17,505)

  • Index Cond: (cmdid = co.cmdid)
22. 35.010 35.010 ↑ 1.0 1 17,505

Index Scan using idxcmd_id on comenzi c (cost=0.42..1.20 rows=1 width=27) (actual time=0.002..0.002 rows=1 loops=17,505)

  • Index Cond: (idcmd = co.cmdid)
23. 52.515 52.515 ↑ 1.0 1 17,505

Index Scan using idxcmdinf_client_idcmdout on comenzi_info ci (cost=0.42..1.56 rows=1 width=21) (actual time=0.002..0.003 rows=1 loops=17,505)

  • Index Cond: (client_idcmdout = co.idcmdout)
  • Filter: ((fazaid = 4) AND ((producator)::text = 'sectia finisatambalat'::text))
  • Rows Removed by Filter: 0
24. 17.505 17.505 ↑ 1.0 1 17,505

Index Scan using idxproduct_esentalemnr on product_esentalemn w (cost=0.14..0.16 rows=1 width=15) (actual time=0.001..0.001 rows=1 loops=17,505)

  • Index Cond: ((esentacod)::text = (co.woodcod)::text)
25. 35.010 35.010 ↑ 1.0 1 17,505

Index Scan using idxcolors_finisaj_colorcod on product_colors_finisaj pf (cost=0.14..0.16 rows=1 width=18) (actual time=0.001..0.002 rows=1 loops=17,505)

  • Index Cond: ((colorcod)::text = (co.finisajcod)::text)
26. 0.000 0.000 ↓ 0.0 0 17,505

Materialize (cost=3.59..3.73 rows=5 width=36) (actual time=0.000..0.000 rows=0 loops=17,505)

27. 0.001 0.037 ↓ 0.0 0 1

Subquery Scan on pp (cost=3.59..3.71 rows=5 width=36) (actual time=0.036..0.037 rows=0 loops=1)

28. 0.000 0.036 ↓ 0.0 0 1

HashAggregate (cost=3.59..3.66 rows=5 width=36) (actual time=0.036..0.036 rows=0 loops=1)

  • Group Key: prodf_planif_ordersfaze.idcmdout
29.          

Initplan (for HashAggregate)

30. 0.015 0.015 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_2 (cost=0.15..2.37 rows=1 width=4) (actual time=0.015..0.015 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
31. 0.035 0.035 ↓ 0.0 0 1

Seq Scan on prodf_planif_ordersfaze (cost=0.00..1.20 rows=5 width=9) (actual time=0.035..0.035 rows=0 loops=1)

  • Filter: (fid = $2)
  • Rows Removed by Filter: 16
32. 0.049 0.058 ↑ 1.0 8 1

Sort (cost=1.26..1.28 rows=8 width=9) (actual time=0.055..0.058 rows=8 loops=1)

  • Sort Key: prodf_planif_selweeks.yw
  • Sort Method: quicksort Memory: 25kB
33. 0.009 0.009 ↑ 1.0 8 1

Seq Scan on prodf_planif_selweeks (cost=0.00..1.14 rows=8 width=9) (actual time=0.007..0.009 rows=8 loops=1)

  • Filter: ((username)::text = (("current_user"())::text)::text)
34. 0.007 0.070 ↓ 2.0 10 1

Hash (cost=3.71..3.71 rows=5 width=36) (actual time=0.070..0.070 rows=10 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
35. 0.002 0.063 ↓ 2.0 10 1

Subquery Scan on p (cost=3.59..3.71 rows=5 width=36) (actual time=0.060..0.063 rows=10 loops=1)

36. 0.000 0.061 ↓ 2.0 10 1

HashAggregate (cost=3.59..3.66 rows=5 width=36) (actual time=0.059..0.061 rows=10 loops=1)

  • Group Key: prodf_planif_ordersfaze_1.idcmdout
37.          

Initplan (for HashAggregate)

38. 0.023 0.023 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_3 (cost=0.15..2.37 rows=1 width=4) (actual time=0.023..0.023 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
39. 0.040 0.040 ↓ 2.2 11 1

Seq Scan on prodf_planif_ordersfaze prodf_planif_ordersfaze_1 (cost=0.00..1.20 rows=5 width=9) (actual time=0.037..0.040 rows=11 loops=1)

  • Filter: (fid = $3)
  • Rows Removed by Filter: 5
40. 0.001 0.041 ↓ 0.0 0 1

Hash (cost=6.15..6.15 rows=5 width=68) (actual time=0.040..0.041 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
41. 0.001 0.040 ↓ 0.0 0 1

Subquery Scan on pd (cost=6.01..6.15 rows=5 width=68) (actual time=0.040..0.040 rows=0 loops=1)

42. 0.000 0.039 ↓ 0.0 0 1

HashAggregate (cost=6.01..6.10 rows=5 width=68) (actual time=0.039..0.039 rows=0 loops=1)

  • Group Key: prodf_planif_ordersfaze_2.idcmdout
43.          

Initplan (for HashAggregate)

44. 0.022 0.022 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_4 (cost=0.15..2.37 rows=1 width=4) (actual time=0.021..0.022 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
45. 0.010 0.010 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_5 (cost=0.15..2.37 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
46. 0.038 0.038 ↓ 0.0 0 1

Seq Scan on prodf_planif_ordersfaze prodf_planif_ordersfaze_2 (cost=0.00..1.24 rows=5 width=10) (actual time=0.038..0.038 rows=0 loops=1)

  • Filter: ((fid = $4) AND (datepr = $5))
  • Rows Removed by Filter: 16
47. 0.000 0.058 ↓ 0.0 0 1

Hash (cost=779.56..779.56 rows=4,705 width=36) (actual time=0.058..0.058 rows=0 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 64kB
48. 0.001 0.058 ↓ 0.0 0 1

Subquery Scan on fbp (cost=673.70..779.56 rows=4,705 width=36) (actual time=0.058..0.058 rows=0 loops=1)

49. 0.023 0.057 ↓ 0.0 0 1

HashAggregate (cost=673.70..732.51 rows=4,705 width=36) (actual time=0.057..0.057 rows=0 loops=1)

  • Group Key: prodf_ordersfaze.idcmdout
50.          

Initplan (for HashAggregate)

51. 0.010 0.010 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_6 (cost=0.15..2.37 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
52. 0.002 0.024 ↓ 0.0 0 1

Bitmap Heap Scan on prodf_ordersfaze (cost=81.53..634.53 rows=7,360 width=8) (actual time=0.024..0.024 rows=0 loops=1)

  • Recheck Cond: (fid = $6)
53. 0.022 0.022 ↓ 0.0 0 1

Bitmap Index Scan on idxprodf_ordersfaze_fid (cost=0.00..79.69 rows=7,360 width=0) (actual time=0.022..0.022 rows=0 loops=1)

  • Index Cond: (fid = $6)
54. 0.670 7.272 ↑ 1.0 4,537 1

Hash (cost=796.28..796.28 rows=4,660 width=36) (actual time=7.272..7.272 rows=4,537 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 259kB
55. 0.316 6.602 ↑ 1.0 4,537 1

Subquery Scan on fb (cost=691.43..796.28 rows=4,660 width=36) (actual time=5.108..6.602 rows=4,537 loops=1)

56. 3.620 6.286 ↑ 1.0 4,537 1

HashAggregate (cost=691.43..749.68 rows=4,660 width=36) (actual time=5.107..6.286 rows=4,537 loops=1)

  • Group Key: prodf_ordersfaze_1.idcmdout
57.          

Initplan (for HashAggregate)

58. 0.010 0.010 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_7 (cost=0.15..2.37 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
59. 2.389 2.656 ↑ 1.2 5,884 1

Bitmap Heap Scan on prodf_ordersfaze prodf_ordersfaze_1 (cost=81.50..652.90 rows=7,233 width=8) (actual time=0.309..2.656 rows=5,884 loops=1)

  • Recheck Cond: (fid = $7)
  • Filter: (qty > '0'::numeric)
  • Rows Removed by Filter: 17
  • Heap Blocks: exact=406
60. 0.267 0.267 ↑ 1.2 5,901 1

Bitmap Index Scan on idxprodf_ordersfaze_fid (cost=0.00..79.69 rows=7,360 width=0) (actual time=0.267..0.267 rows=5,901 loops=1)

  • Index Cond: (fid = $7)
61. 0.011 1.544 ↑ 8.8 14 1

GroupAggregate (cost=657.80..660.58 rows=123 width=36) (actual time=1.527..1.544 rows=14 loops=1)

  • Group Key: prodf_ordersfaze_2.idcmdout
62.          

Initplan (for GroupAggregate)

63. 0.017 0.017 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_8 (cost=0.15..2.37 rows=1 width=4) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
64. 0.009 1.516 ↑ 8.3 15 1

Sort (cost=655.43..655.74 rows=124 width=8) (actual time=1.515..1.516 rows=15 loops=1)

  • Sort Key: prodf_ordersfaze_2.idcmdout
  • Sort Method: quicksort Memory: 25kB
65. 1.230 1.507 ↑ 8.3 15 1

Bitmap Heap Scan on prodf_ordersfaze prodf_ordersfaze_2 (cost=79.72..651.12 rows=124 width=8) (actual time=0.450..1.507 rows=15 loops=1)

  • Recheck Cond: (fid = $8)
  • Filter: (qty < '0'::numeric)
  • Rows Removed by Filter: 5,886
  • Heap Blocks: exact=406
66. 0.277 0.277 ↑ 1.2 5,901 1

Bitmap Index Scan on idxprodf_ordersfaze_fid (cost=0.00..79.69 rows=7,360 width=0) (actual time=0.277..0.277 rows=5,901 loops=1)

  • Index Cond: (fid = $8)
67. 0.715 3,018.608 ↓ 76.9 1,077 1

GroupAggregate (cost=362,904.71..362,905.09 rows=14 width=12) (actual time=3,017.821..3,018.608 rows=1,077 loops=1)

  • Group Key: co_1.idcmdout
68. 0.862 3,017.893 ↓ 81.1 1,135 1

Sort (cost=362,904.71..362,904.74 rows=14 width=1,123) (actual time=3,017.812..3,017.893 rows=1,135 loops=1)

  • Sort Key: co_1.idcmdout
  • Sort Method: quicksort Memory: 137kB
69.          

Initplan (for Sort)

70. 0.012 0.012 ↑ 1.0 1 1

Index Scan using idxallvarslowerusername on myvars myvars_9 (cost=0.15..2.37 rows=1 width=8) (actual time=0.011..0.012 rows=1 loops=1)

  • Index Cond: (lower((username)::text) = lower((("current_user"())::text)::text))
71. 142.328 3,017.019 ↓ 81.1 1,135 1

Merge Semi Join (cost=359,734.53..362,902.07 rows=14 width=1,123) (actual time=2,877.858..3,017.019 rows=1,135 loops=1)

  • Merge Cond: (yweek(date(co_1.cmdoutdataprod)) = (prodf_planif_selweeks_1.yw)::text)
72. 6.714 2,874.658 ↓ 2.1 18,550 1

Nested Loop Left Join (cost=264,974.00..1,745,378.09 rows=8,903 width=29) (actual time=805.925..2,874.658 rows=18,550 loops=1)

73. 609.044 2,812.294 ↓ 2.1 18,550 1

Nested Loop Left Join (cost=264,973.86..1,743,836.82 rows=8,903 width=30) (actual time=805.899..2,812.294 rows=18,550 loops=1)

  • Join Filter: ((c_1.artid = s.artid) AND ((co_1.idcmdout)::double precision = s.idpure))
  • Rows Removed by Join Filter: 9,880,825
74. 9.109 1,034.600 ↓ 2.1 18,550 1

Nested Loop (cost=1.85..150,361.02 rows=8,903 width=26) (actual time=18.747..1,034.600 rows=18,550 loops=1)

75. 12.214 988.391 ↓ 2.1 18,550 1

Nested Loop Left Join (cost=1.56..146,460.22 rows=8,903 width=30) (actual time=18.729..988.391 rows=18,550 loops=1)

76. 83.422 83.422 ↓ 2.0 17,505 1

Index Scan using idxcmdout_yweekcmdoutdataprod on comenzi_out co_1 (cost=0.43..90,107.89 rows=8,903 width=27) (actual time=18.643..83.422 rows=17,505 loops=1)

  • Filter: ((prod_type)::text ~~ ($9)::text)
  • Rows Removed by Filter: 101,329
77. 25.119 892.755 ↑ 1.0 1 17,505

Nested Loop Left Join (cost=1.14..6.32 rows=1 width=8) (actual time=0.030..0.051 rows=1 loops=17,505)

78. 52.515 52.515 ↑ 1.0 1 17,505

Index Scan using idxcmdinf_client_idcmdout on comenzi_info ci_1 (cost=0.42..1.56 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=17,505)

  • Index Cond: (client_idcmdout = co_1.idcmdout)
  • Filter: ((fazaid = 4) AND ((producator)::text = 'sectia finisatambalat'::text))
  • Rows Removed by Filter: 0
79. 68.629 815.121 ↑ 1.0 1 17,343

Nested Loop (cost=0.71..4.75 rows=1 width=8) (actual time=0.026..0.047 rows=1 loops=17,343)

80. 138.744 138.744 ↓ 2.2 18 17,343

Index Scan using idxcmdout_cmdid on comenzi_out c_1 (cost=0.43..2.30 rows=8 width=8) (actual time=0.004..0.008 rows=18 loops=17,343)

  • Index Cond: (cmdid = ci_1.cmdid)
81. 607.748 607.748 ↓ 0.0 0 303,874

Index Scan using idxart_idart on articole a_2 (cost=0.29..0.31 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=303,874)

  • Index Cond: (idart = c_1.artid)
  • Filter: ((NOT exclus_lansare) AND (art_type = 5))
  • Rows Removed by Filter: 1
82. 37.100 37.100 ↑ 1.0 1 18,550

Index Only Scan using idxart_idart on articole a_1 (cost=0.29..0.44 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=18,550)

  • Index Cond: (idart = co_1.artid)
  • Heap Fetches: 18,550
83. 381.687 1,168.650 ↑ 14.0 533 18,550

Materialize (cost=264,972.01..265,344.91 rows=7,459 width=20) (actual time=0.043..0.063 rows=533 loops=18,550)

84. 0.040 786.963 ↑ 13.9 537 1

Subquery Scan on s (cost=264,972.01..265,307.61 rows=7,459 width=20) (actual time=786.702..786.963 rows=537 loops=1)

85. 0.195 786.923 ↑ 13.9 537 1

GroupAggregate (cost=264,972.01..265,233.02 rows=7,459 width=20) (actual time=786.701..786.923 rows=537 loops=1)

  • Group Key: f.idpure, f.artid
86. 0.390 786.728 ↑ 30.8 605 1

Sort (cost=264,972.01..265,018.62 rows=18,642 width=20) (actual time=786.692..786.728 rows=605 loops=1)

  • Sort Key: f.idpure, f.artid
  • Sort Method: quicksort Memory: 72kB
87. 0.116 786.338 ↑ 30.8 605 1

Subquery Scan on f (cost=200,065.88..263,649.71 rows=18,642 width=20) (actual time=549.304..786.338 rows=605 loops=1)

88. 18.806 786.222 ↑ 30.8 605 1

Hash Left Join (cost=200,065.88..263,463.29 rows=18,642 width=28) (actual time=549.303..786.222 rows=605 loops=1)

  • Hash Cond: (docin.lot = stock_flow_docout.lotout)
  • Filter: ((((docin.cantrec)::double precision - COALESCE(stock_flow_docout.qout, '0'::double precision)) > '1e-05'::double precision) OR (COALESCE(stock_flow_docout.qtvliv, '0'::double precision) <> '0'::double precision) OR (COALESCE(stock_flow_docout.qpro, '0'::double precision) <> '0'::double precision))
  • Rows Removed by Filter: 25,033
89. 4.440 223.748 ↓ 2.4 25,638 1

Nested Loop Left Join (cost=1,132.26..64,222.55 rows=10,475 width=21) (actual time=2.527..223.748 rows=25,638 loops=1)

  • Filter: (COALESCE(CASE (COALESCE((docin.subcomanda_out)::double precision, '0'::double precision) <> '0'::double precision) WHEN CASE_TEST_EXPR THEN COALESCE((docin.subcomanda_out)::double precision, '0'::double precision) ELSE (comenzi_info.client_idcmdout)::double precision END, '0'::double precision) <> '0'::double precision)
  • Rows Removed by Filter: 21,571
90. 13.013 124.890 ↓ 4.5 47,209 1

Hash Join (cost=1,131.83..57,766.94 rows=10,528 width=32) (actual time=2.508..124.890 rows=47,209 loops=1)

  • Hash Cond: (docin.artid = a_3.idart)
91. 109.450 109.450 ↓ 1.0 80,476 1

Index Scan using idxdocingestid on docin (cost=0.43..55,623.77 rows=80,135 width=1,455) (actual time=0.056..109.450 rows=80,476 loops=1)

  • Index Cond: (gestid = ANY ('{57,66}'::integer[]))
  • Filter: valid
92. 0.267 2.427 ↑ 1.1 1,921 1

Hash (cost=1,105.09..1,105.09 rows=2,105 width=4) (actual time=2.427..2.427 rows=1,921 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 100kB
93. 2.024 2.160 ↑ 1.1 1,921 1

Bitmap Heap Scan on articole a_3 (cost=25.23..1,105.09 rows=2,105 width=4) (actual time=0.180..2.160 rows=1,921 loops=1)

  • Recheck Cond: (art_type = 5)
  • Filter: (NOT exclus_lansare)
  • Rows Removed by Filter: 308
  • Heap Blocks: exact=400
94. 0.136 0.136 ↑ 1.0 2,229 1

Bitmap Index Scan on idxart_art_type (cost=0.00..24.70 rows=2,229 width=0) (actual time=0.136..0.136 rows=2,229 loops=1)

  • Index Cond: (art_type = 5)
95. 94.418 94.418 ↑ 1.0 1 47,209

Index Scan using idxcmdinf_cmdid on comenzi_info (cost=0.43..0.59 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=47,209)

  • Index Cond: (cmdid = CASE ((docin.tipdoc)::text = 'recterti'::text) WHEN CASE_TEST_EXPR THEN docin.comanda_out ELSE CASE (COALESCE((docin.subcomanda_out)::double precision, '0'::double precision) <> '0'::double precision) WHEN CASE_TEST_EXPR THEN docin.comanda_out ELSE docin.comandain END END)
96. 11.328 543.668 ↑ 2.9 48,566 1

Hash (cost=197,150.95..197,150.95 rows=142,613 width=28) (actual time=543.668..543.668 rows=48,566 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 5,084kB
97. 3.445 532.340 ↑ 2.9 48,566 1

Subquery Scan on stock_flow_docout (cost=194,298.69..197,150.95 rows=142,613 width=28) (actual time=515.975..532.340 rows=48,566 loops=1)

98. 146.719 528.895 ↑ 2.9 48,566 1

HashAggregate (cost=194,298.69..195,724.82 rows=142,613 width=28) (actual time=515.973..528.895 rows=48,566 loops=1)

  • Group Key: docout.lotout
99. 82.829 382.176 ↓ 1.6 234,707 1

Nested Loop (cost=0.86..190,376.84 rows=142,613 width=23) (actual time=0.050..382.176 rows=234,707 loops=1)

100. 57.919 57.919 ↓ 1.0 80,476 1

Index Scan using idxdocingestid on docin docin_1 (cost=0.43..54,622.09 rows=80,135 width=4) (actual time=0.015..57.919 rows=80,476 loops=1)

  • Index Cond: (gestid = ANY ('{57,66}'::integer[]))
101. 241.428 241.428 ↑ 3.0 3 80,476

Index Scan using idxdocoutlotout on docout (cost=0.43..1.60 rows=9 width=23) (actual time=0.002..0.003 rows=3 loops=80,476)

  • Index Cond: (lotout = docin_1.lot)
  • Filter: valid
102. 55.650 55.650 ↑ 1.0 1 18,550

Index Only Scan using idxcolors_finisaj_colorcod on product_colors_finisaj pf_1 (cost=0.14..0.16 rows=1 width=3) (actual time=0.002..0.003 rows=1 loops=18,550)

  • Index Cond: (colorcod = (co_1.finisajcod)::text)
  • Heap Fetches: 18,550
103. 0.014 0.033 ↑ 1.0 8 1

Sort (cost=1.26..1.28 rows=8 width=9) (actual time=0.031..0.033 rows=8 loops=1)

  • Sort Key: prodf_planif_selweeks_1.yw
  • Sort Method: quicksort Memory: 25kB
104. 0.019 0.019 ↑ 1.0 8 1

Seq Scan on prodf_planif_selweeks prodf_planif_selweeks_1 (cost=0.00..1.14 rows=8 width=9) (actual time=0.016..0.019 rows=8 loops=1)

  • Filter: ((username)::text = (("current_user"())::text)::text)
Planning time : 34.243 ms
Execution time : 3,522.579 ms