Advertisement
Guest User

Untitled

a guest
Sep 26th, 2014
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.55 KB | None | 0 0
  1. QUERY PLAN
  2. -----------------------------------------------------------------------------------------------------------------------------------------------------------------
  3. Hash Full Join (cost=120077.27..288149.57 rows=1433 width=247)
  4. Hash Cond: (cld.product_custom_identificator = collected.pci)
  5. Filter: ((COALESCE((sum(cld.count)), 0::real) <> 0::double precision) OR (COALESCE(collected.total, 0::numeric) <> 0::numeric))
  6. -> HashAggregate (cost=23731.30..23745.64 rows=1434 width=15)
  7. InitPlan 25 (returns $39)
  8. -> Index Scan using uniq_t_currentlevel_stocktakingid_storeid on t_currentlevel cl (cost=0.27..8.29 rows=1 width=8)
  9. Index Cond: (stocktaking_id = 'TeKarvinaKosmo07092014;87'::text)
  10. -> Bitmap Heap Scan on t_currentlevel_data cld (cost=913.72..23435.31 rows=38360 width=15)
  11. Recheck Cond: (batch_id = $39)
  12. -> Bitmap Index Scan on ind_currentleveldata_batchid_pci (cost=0.00..904.13 rows=38360 width=0)
  13. Index Cond: (batch_id = $39)
  14. -> Hash (cost=96345.84..96345.84 rows=10 width=232)
  15. -> Subquery Scan on collected (cost=96345.72..96345.84 rows=10 width=232)
  16. -> Sort (cost=96345.72..96345.74 rows=10 width=129)
  17. Sort Key: ((SubPlan 17))
  18. InitPlan 23 (returns $33)
  19. -> Index Scan using t_store_info_pkey on t_store_info s_9 (cost=0.28..8.29 rows=1 width=8)
  20. Index Cond: (id = 87::bigint)
  21. -> GroupAggregate (cost=95479.18..96337.26 rows=10 width=129)
  22. -> Sort (cost=95479.18..95479.20 rows=10 width=129)
  23. Sort Key: w.stocktaking_id, ((SubPlan 22))
  24. -> Nested Loop (cost=313.42..95479.01 rows=10 width=129)
  25. -> Bitmap Heap Scan on t_weighting w (cost=312.99..94922.43 rows=46 width=77)
  26. Recheck Cond: ((stocktaking_id)::text = 'TeKarvinaKosmo07092014;87'::text)
  27. Filter: ((user_id)::text = ((SubPlan 24))::text)
  28. -> Bitmap Index Scan on idx_t_weighting_stocktaking_id_user_id (cost=0.00..312.98 rows=9141 width=0)
  29. Index Cond: ((stocktaking_id)::text = 'TeKarvinaKosmo07092014;87'::text)
  30. SubPlan 24
  31. -> Limit (cost=8.46..8.46 rows=1 width=16)
  32. -> Sort (cost=8.46..8.46 rows=1 width=16)
  33. Sort Key: wi.stat_item_start
  34. -> Index Scan using int_t_weighting_coordinates on t_weighting wi (cost=0.42..8.45 rows=1 width=16)
  35. Index Cond: ((coord_z = w.coord_z) AND (coord_x = w.coord_x) AND (coord_y = w.coord_y))
  36. Filter: ((stocktaking_id)::text = (w.stocktaking_id)::text)
  37. -> Index Scan using t_item_ean_company_fk_uniq on t_item i (cost=0.43..8.45 rows=1 width=52)
  38. Index Cond: ((ean = w.item_ean) AND (company_fk = $33))
  39. SubPlan 22
  40. -> Limit (cost=8.72..16.74 rows=1 width=11)
  41. InitPlan 21 (returns $31)
  42. -> Index Scan using t_store_info_pkey on t_store_info s_8 (cost=0.28..8.29 rows=1 width=8)
  43. Index Cond: (id = 87::bigint)
  44. -> Index Scan using inx_pn_companyfk_ean on t_pn pn_1 (cost=0.43..8.45 rows=1 width=11)
  45. Index Cond: ((company_fk = $31) AND (i.ean = ean))
  46. SubPlan 17
  47. -> Limit (cost=8.29..8.41 rows=1 width=11)
  48. InitPlan 16 (returns $19)
  49. -> Index Scan using t_store_info_pkey on t_store_info s_7 (cost=0.28..8.29 rows=1 width=8)
  50. Index Cond: (id = 87::bigint)
  51. -> Nested Loop (cost=0.00..72351.91 rows=624663 width=11)
  52. -> Seq Scan on t_pn pn (cost=0.00..37498.65 rows=1 width=11)
  53. Filter: ((max(w.item_ean) = ean) AND (company_fk = $19))
  54. -> Seq Scan on t_weighting w4 (cost=0.00..28606.63 rows=624663 width=0)
  55. SubPlan 18
  56. -> Result (cost=0.00..0.02 rows=1 width=0)
  57. SubPlan 19
  58. -> Result (cost=0.00..0.02 rows=1 width=0)
  59. SubPlan 20
  60. -> Aggregate (cost=60.55..60.56 rows=1 width=52)
  61. -> HashAggregate (cost=60.45..60.47 rows=1 width=27)
  62. -> Index Scan using idx_t_weighting_stocktaking_id_item_ean on t_weighting w3 (cost=0.43..60.36 rows=4 width=27)
  63. Index Cond: (((stocktaking_id)::text = (w.stocktaking_id)::text) AND (item_ean = ANY (array_agg(w.item_ean))))
  64. SubPlan 5
  65. -> Result (cost=33.50..33.51 rows=1 width=0)
  66. InitPlan 4 (returns $5)
  67. -> Limit (cost=8.72..33.50 rows=1 width=13)
  68. InitPlan 3 (returns $2)
  69. -> Index Scan using t_store_info_pkey on t_store_info s_1 (cost=0.28..8.29 rows=1 width=8)
  70. Index Cond: (id = 87::bigint)
  71. -> Index Scan using inx_pn_companyfk_pci on t_pn pe (cost=0.43..25.21 rows=1 width=13)
  72. Index Cond: ((company_fk = $2) AND (product_custom_identificator = COALESCE(cld.product_custom_identificator, collected.pci)))
  73. SubPlan 2
  74. -> Limit (cost=16.75..16.76 rows=1 width=4)
  75. InitPlan 1 (returns $0)
  76. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.28..8.29 rows=1 width=8)
  77. Index Cond: (id = 87::bigint)
  78. -> Aggregate (cost=8.46..8.46 rows=1 width=4)
  79. -> Index Scan using t_item_ean_company_fk_uniq on t_item iu (cost=0.43..8.45 rows=1 width=4)
  80. Index Cond: ((pe.ean = ean) AND (company_fk = $0))
  81. SubPlan 7
  82. -> Aggregate (cost=16.75..16.76 rows=1 width=13)
  83. InitPlan 6 (returns $6)
  84. -> Index Scan using t_store_info_pkey on t_store_info s_2 (cost=0.28..8.29 rows=1 width=8)
  85. Index Cond: (id = 87::bigint)
  86. -> Index Scan using inx_pn_companyfk_pci on t_pn pe_1 (cost=0.43..8.45 rows=1 width=13)
  87. Index Cond: ((company_fk = $6) AND (product_custom_identificator = COALESCE(cld.product_custom_identificator, collected.pci)))
  88. SubPlan 11
  89. -> Limit (cost=8.72..33.48 rows=1 width=13)
  90. InitPlan 10 (returns $11)
  91. -> Index Scan using t_store_info_pkey on t_store_info s_4 (cost=0.28..8.29 rows=1 width=8)
  92. Index Cond: (id = 87::bigint)
  93. -> Index Scan using inx_pn_companyfk_pci on t_pn pd (cost=0.43..25.19 rows=1 width=13)
  94. Index Cond: ((company_fk = $11) AND (product_custom_identificator = COALESCE(cld.product_custom_identificator, collected.pci)))
  95. SubPlan 9
  96. -> Limit (cost=8.72..16.74 rows=1 width=27)
  97. InitPlan 8 (returns $9)
  98. -> Index Scan using t_store_info_pkey on t_store_info s_3 (cost=0.28..8.29 rows=1 width=8)
  99. Index Cond: (id = 87::bigint)
  100. -> Index Scan using t_item_ean_company_fk_uniq on t_item i_1 (cost=0.43..8.45 rows=1 width=27)
  101. Index Cond: ((ean = pd.ean) AND (company_fk = $9))
  102. SubPlan 15
  103. -> Limit (cost=8.72..33.48 rows=1 width=13)
  104. InitPlan 14 (returns $16)
  105. -> Index Scan using t_store_info_pkey on t_store_info s_6 (cost=0.28..8.29 rows=1 width=8)
  106. Index Cond: (id = 87::bigint)
  107. -> Index Scan using inx_pn_companyfk_pci on t_pn pe_2 (cost=0.43..25.19 rows=1 width=13)
  108. Index Cond: ((company_fk = $16) AND (product_custom_identificator = COALESCE(cld.product_custom_identificator, collected.pci)))
  109. SubPlan 13
  110. -> Limit (cost=8.72..16.74 rows=1 width=8)
  111. InitPlan 12 (returns $14)
  112. -> Index Scan using t_store_info_pkey on t_store_info s_5 (cost=0.28..8.29 rows=1 width=8)
  113. Index Cond: (id = 87::bigint)
  114. -> Index Scan using t_item_ean_company_fk_uniq on t_item hi (cost=0.43..8.45 rows=1 width=8)
  115. Index Cond: ((pe_2.ean = ean) AND (company_fk = $14))
  116. (113 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement