Quantcast

stock edit very slow

classic Classic list List threaded Threaded
3 messages Options
Massimo 676 Massimo 676
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

stock edit very slow

Hi,
in my installation if i try to edit a stock part, i wait 20sec until the form appears.
The Db is optimized with "mysqltuner" but this is not enough.
What can I do? thanks for the help
perp_order 3,569 rows
perp_order_line 13,184 rows
perp_shipment_line 13,131 rows
perp_goods_recived 1,857 rows
A query to slow is for example:
# Time: 120405 16:55:48
# User@Host: egroupware[egroupware] @ localhost []
# Query_time: 12.510720 Lock_time: 0.000200 Rows_sent: 0 Rows_examined: 112887256
use egroupware;
SET timestamp=1333637748;
SELECT count(perp_order.order_id) AS count FROM perp_order JOIN perp_order_line ON
perp_order.order_id = perp_order_line.order_id LEFT JOIN perp_client ON
perp_client.client_id = perp_order.client_id LEFT JOIN perp_supplier ON
perp_supplier.supplier_id = perp_order.supplier_id JOIN (
SELECT order_id, line_no, perp_order_line.quantity_ordered , IF(shipped.quantity_received IS NULL, 0, shipped.quantity_received) AS quantity_received
FROM perp_order_line
LEFT JOIN (
SELECT shippable_id, shippable_item_line, sum(quantity_units) AS quantity_received
FROM perp_shipment_line
LEFT JOIN perp_goods_received ON
perp_goods_received.shipment_id = perp_shipment_line.shipment_id
AND perp_goods_received.line_no = perp_shipment_line.line_no
GROUP BY perp_shipment_line.shippable_id, perp_shipment_line.shippable_item_line
) AS shipped ON shipped.shippable_id = perp_order_line.order_id
AND shipped.shippable_item_line = perp_order_line.line_no
GROUP BY order_id
HAVING quantity_received < quantity_ordered
) AS not_received ON
not_received.order_id = perp_order_line.order_id
AND not_received.line_no = perp_order_line.line_no WHERE perp_order.supplier_id = 2 AND closed_date IS NULL AND perp_order_line.stock_id IN ( 806) AND perp_order_line.supplier_stock_code = 'RC404056' GROUP BY perp_order.order_id;
Nathan Gray Nathan Gray
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: stock edit very slow

On Wed, Apr 11, 2012 at 1:57 AM, Massimo 676 <[hidden email]> wrote:
> Hi,
> in my installation if i try to edit a stock part, i wait 20sec until the
> form appears.

Looks like the 'On order' column in the suppliers tab.
Try commenting out perp_inventory/inc/class.ui_perp_stock.inc.php line 407.
Your suppliers tab will be empty, but let me know if that speeds it up for you.

Nathan

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Perp-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/perp-developers
Massimo 676 Massimo 676
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: stock edit very slow

Thank you,
I commented the line 407 and is now very fast.
Where are constructing queries that slow down the opening of form?

thanks again
Loading...