Virtual Column M_Product.CostStandard too heavy

Description

The script 360lts-i1.0a/postgresql/862a_ManufacturingLight.sql added a virtual column to M_Product for CostStandard with the following query:

SELECT ROUND(SUM(c.CurrentCostPrice),2) FROM M_Cost c INNER JOIN M_CostElement e ON (e.M_CostElement_ID=c.M_CostElement_ID) WHERE e.CostingMethod='S' AND c.M_Product_ID=M_Product.M_Product_ID

It is not recommended to add such virtual columns to big and heavily used tables, in a migrated adempiere installation the products for one of the tenants is 9766 rows, and M_Cost has 31.529 - but the Product window is not able to load the records in the 30 seconds timeout.

Disabling that column makes the opening immediate.

I think is better to disable that column and if somebody wants it better to implement it in a subtab - or in a Help Widget.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Priority

Created September 5, 2014 at 1:31 PM
Updated December 26, 2021 at 5:28 PM
Resolved September 5, 2014 at 1:53 PM

Flag notifications