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 11.67 KB | None | 0 0
  1. QUERY PLAN
  2. -----------------------------------------------------------------------------------------------------------------------------------------------------
  3. Merge Full Join (cost=118144.39..286409.41 rows=1425 width=272)
  4. Merge Cond: (((SubPlan 17)) = cld.product_custom_identificator)
  5. Filter: ((COALESCE((sum(cld.count)), 0::real) <> 0::double precision) OR (COALESCE(((SubPlan 18)), 0::numeric) <> 0::numeric))
  6. -> Sort (cost=94186.39..94186.42 rows=10 width=129)
  7. Sort Key: ((SubPlan 17))
  8. InitPlan 23 (returns $33)
  9. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  10. Index Cond: (id = 87::bigint)
  11. -> GroupAggregate (cost=93334.74..94177.96 rows=10 width=129)
  12. -> Sort (cost=93334.74..93334.76 rows=10 width=129)
  13. Sort Key: w.stocktaking_id, ((SubPlan 22))
  14. -> Nested Loop (cost=331.60..93334.57 rows=10 width=129)
  15. -> Bitmap Heap Scan on t_weighting w (cost=331.60..92778.13 rows=45 width=97)
  16. Recheck Cond: ((stocktaking_id)::text = 'TeKarvinaKosmo07092014;87'::text)
  17. Filter: ((user_id)::text = ((SubPlan 24))::text)
  18. -> Bitmap Index Scan on idx_t_weighting_stocktaking_id_user_id (cost=0.00..331.59 rows=8954 width=0)
  19. Index Cond: ((stocktaking_id)::text = 'TeKarvinaKosmo07092014;87'::text)
  20. SubPlan 24
  21. -> Limit (cost=8.42..8.42 rows=1 width=16)
  22. -> Sort (cost=8.42..8.42 rows=1 width=16)
  23. Sort Key: wi.stat_item_start
  24. -> Index Scan using int_t_weighting_coordinates on t_weighting wi (cost=0.00..8.41 rows=1 width=16)
  25. Index Cond: ((coord_z = $36) AND (coord_x = $34) AND (coord_y = $35))
  26. Filter: ((stocktaking_id)::text = ($37)::text)
  27. -> Index Scan using t_item_ean_company_fk_uniq on t_item i (cost=0.00..8.60 rows=1 width=52)
  28. Index Cond: ((i.ean = w.item_ean) AND (i.company_fk = $33))
  29. SubPlan 22
  30. -> Limit (cost=8.27..16.90 rows=1 width=11)
  31. InitPlan 21 (returns $31)
  32. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  33. Index Cond: (id = 87::bigint)
  34. -> Index Scan using inx_pn_companyfk_ean on t_pn pn (cost=0.00..8.64 rows=1 width=11)
  35. Index Cond: ((company_fk = $31) AND ($32 = ean))
  36. SubPlan 17
  37. -> Limit (cost=8.27..8.32 rows=1 width=11)
  38. InitPlan 16 (returns $19)
  39. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  40. Index Cond: (id = 87::bigint)
  41. -> Nested Loop (cost=0.00..34861.90 rows=624663 width=11)
  42. -> Index Scan using inx_pn_companyfk_ean on t_pn pn (cost=0.00..8.64 rows=1 width=11)
  43. Index Cond: ((company_fk = $19) AND ($20 = ean))
  44. -> Seq Scan on t_weighting w4 (cost=0.00..28606.63 rows=624663 width=0)
  45. SubPlan 18
  46. -> Result (cost=0.00..0.02 rows=1 width=0)
  47. SubPlan 19
  48. -> Result (cost=0.00..0.02 rows=1 width=0)
  49. SubPlan 20
  50. -> Aggregate (cost=58.90..58.97 rows=1 width=52)
  51. -> HashAggregate (cost=58.86..58.89 rows=1 width=27)
  52. -> Bitmap Heap Scan on t_weighting w3 (cost=42.83..58.77 rows=4 width=27)
  53. Recheck Cond: (((stocktaking_id)::text = ($30)::text) AND (item_ean = ANY ($29)))
  54. -> Bitmap Index Scan on idx_t_weighting_stocktaking_id_item_ean (cost=0.00..42.82 rows=4 width=0)
  55. Index Cond: (((stocktaking_id)::text = ($30)::text) AND (item_ean = ANY ($29)))
  56. -> Sort (cost=23958.00..23961.57 rows=1426 width=40)
  57. Sort Key: cld.product_custom_identificator
  58. -> HashAggregate (cost=23847.65..23869.04 rows=1426 width=15)
  59. InitPlan 25 (returns $38)
  60. -> Index Scan using uniq_t_currentlevel_stocktakingid_storeid on t_currentlevel cl (cost=0.00..8.27 rows=1 width=8)
  61. Index Cond: (stocktaking_id = 'TeKarvinaKosmo07092014;87'::text)
  62. -> Bitmap Heap Scan on t_currentlevel_data cld (cost=1030.09..23551.68 rows=38360 width=15)
  63. Recheck Cond: (batch_id = $38)
  64. -> Bitmap Index Scan on ind_currentleveldata_batchid_pci (cost=0.00..1020.50 rows=38360 width=0)
  65. Index Cond: (batch_id = $38)
  66. SubPlan 5
  67. -> Result (cost=33.74..33.75 rows=1 width=0)
  68. InitPlan 4 (returns $5)
  69. -> Limit (cost=8.27..33.74 rows=1 width=13)
  70. InitPlan 3 (returns $2)
  71. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  72. Index Cond: (id = 87::bigint)
  73. -> Index Scan using inx_pn_companyfk_pci on t_pn pe (cost=0.00..25.47 rows=1 width=13)
  74. Index Cond: ((company_fk = $2) AND (product_custom_identificator = COALESCE($3, $4)))
  75. SubPlan 2
  76. -> Limit (cost=16.87..16.88 rows=1 width=4)
  77. InitPlan 1 (returns $0)
  78. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  79. Index Cond: (id = 87::bigint)
  80. -> Aggregate (cost=8.60..8.61 rows=1 width=4)
  81. -> Index Scan using t_item_ean_company_fk_uniq on t_item iu (cost=0.00..8.59 rows=1 width=4)
  82. Index Cond: (($1 = ean) AND (company_fk = $0))
  83. SubPlan 7
  84. -> Aggregate (cost=16.86..16.87 rows=1 width=13)
  85. InitPlan 6 (returns $6)
  86. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  87. Index Cond: (id = 87::bigint)
  88. -> Index Scan using inx_pn_companyfk_pci on t_pn pe (cost=0.00..8.59 rows=1 width=13)
  89. Index Cond: ((company_fk = $6) AND (product_custom_identificator = COALESCE($7, $8)))
  90. SubPlan 11
  91. -> Limit (cost=8.27..33.72 rows=1 width=13)
  92. InitPlan 10 (returns $11)
  93. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  94. Index Cond: (id = 87::bigint)
  95. -> Index Scan using inx_pn_companyfk_pci on t_pn pd (cost=0.00..25.45 rows=1 width=13)
  96. Index Cond: ((company_fk = $11) AND (product_custom_identificator = COALESCE($12, $13)))
  97. SubPlan 9
  98. -> Limit (cost=8.27..16.86 rows=1 width=27)
  99. InitPlan 8 (returns $9)
  100. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  101. Index Cond: (id = 87::bigint)
  102. -> Index Scan using t_item_ean_company_fk_uniq on t_item i (cost=0.00..8.59 rows=1 width=27)
  103. Index Cond: ((ean = $10) AND (company_fk = $9))
  104. SubPlan 15
  105. -> Limit (cost=8.27..33.72 rows=1 width=13)
  106. InitPlan 14 (returns $16)
  107. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  108. Index Cond: (id = 87::bigint)
  109. -> Index Scan using inx_pn_companyfk_pci on t_pn pe (cost=0.00..25.45 rows=1 width=13)
  110. Index Cond: ((company_fk = $16) AND (product_custom_identificator = COALESCE($17, $18)))
  111. SubPlan 13
  112. -> Limit (cost=8.27..16.86 rows=1 width=8)
  113. InitPlan 12 (returns $14)
  114. -> Index Scan using t_store_info_pkey on t_store_info s (cost=0.00..8.27 rows=1 width=8)
  115. Index Cond: (id = 87::bigint)
  116. -> Index Scan using t_item_ean_company_fk_uniq on t_item hi (cost=0.00..8.59 rows=1 width=8)
  117. Index Cond: (($15 = ean) AND (company_fk = $14))
  118. (115 rows)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement