← Back to team overview

openerp-india team mailing list archive

[Bug 1000195] Re: Performance issue in sale 6.1

 

Hello, same problem here.

Maybe this is related to bug 932524 .

Our customer has ~2500 invoices and ~1000 rows in res_currency_rate
table.

While opening
accounting -> reporting -> statistics reports -> invoices analysis
on our server, postgresql logs the following durations:

2012-05-18 09:44:14 CEST [1458]: [1-1]
user=openerp,db=xxxxx,remote=127.0.0.1(49168)  LOG:  duration: 12964.719
ms  statement: SELECT min(account_invoice_report.id) AS id,
count(account_invoice_report.id) AS
categ_id_count,"account_invoice_report".categ_id,
sum("account_invoice_report"."nbr") AS nbr,
sum("account_invoice_report"."product_qty") AS product_qty,
sum("account_invoice_report"."price_total") AS price_total FROM
"account_invoice_report" WHERE ((((account_invoice_report."date" <=
'2012-05-18')  AND  (account_invoice_report."date" >= '2012-01-01')) AND
((account_invoice_report."state" not in ('draft','cancel')) OR
account_invoice_report."state" IS NULL))  AND
((account_invoice_report."type" = 'out_invoice')  OR
(account_invoice_report."type" = 'out_refund'))) GROUP BY
"account_invoice_report".categ_id

2012-05-18 09:51:23 CEST [1458]: [2-1]
user=openerp,db=xxxxx,remote=127.0.0.1(49168)  LOG:  duration:
429323.694 ms  statement: SELECT "account_invoice_report".id FROM
"account_invoice_report" LEFT JOIN "product_category" ON
("account_invoice_report"."categ_id" = "product_category"."id") WHERE
(account_invoice_report."id" in (4219)) ORDER BY
"product_category"."parent_left"

2012-05-18 09:58:42 CEST [1458]: [3-1]
user=openerp,db=xxxxx,remote=127.0.0.1(49168)  LOG:  duration:
438652.536 ms  statement: SELECT
account_invoice_report."categ_id",account_invoice_report.id FROM
"account_invoice_report" WHERE account_invoice_report.id IN (4219) ORDER
BY date desc

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1000195

Title:
  Performance issue in sale 6.1

Status in OpenERP Addons (modules):
  New

Bug description:
  The sale-module produces a lot of selects to the
  account_invoice_report database view. I think its one of the widget in
  the dashboard that does this. Anyway the performance are lousy and a
  ticking bomb for many 6.1 installations.

  
  This select takes 8000 ms with 450 invoices in the database
  SELECT month,price_total FROM "account_invoice_report" WHERE account_invoice_report.id IN (450 ids)

  The company creats over 200 000 invoices per year, which was OK with
  series 5 of OpenERP. It will not be possible now after upgrade to 6.1.
  There are many installations who creates more than 400 invoices per
  year, many that creats 400 invoinces per day.

  I think we need a temporary table or something instead of this
  database view. Every time a salesman opens his saleview he hits this
  problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1000195/+subscriptions


References