← Back to team overview

openerp-expert-accounting team mailing list archive

[Bug 1000195] Re: Performance issue in invoice analysis

 

Hello,

As you have noticed, the delay is due to the computation of the fields
delay_to_pay and due_delay. We have improved the computation to a faster
version of the query.

revno: 7254
revision-id: mat@xxxxxxxxxxx-20131004092309-5ni48mpupfcms181

Please note that this is not a full fix, it will improve the delay but
it's still slow on big databases. If these two fields are not mandatory
to you, removing the computation (patch attached, will always return 0)
will have way better results.

On a test database, a simple query on account_invoice_report, went from
impossible to compute (stopped the computation after some time) to 24sec
with the merged patch at revision 7254. Without these two fields
(attached patch), it takes 3sec.

Also please note that these fields have been removed in 7.0 (too slow
and had an ambiguous meaning)

** Patch added: "account_invoice_report_zero.diff"
   https://bugs.launchpad.net/openobject-addons/+bug/1000195/+attachment/3859013/+files/account_invoice_report_zero.diff

-- 
You received this bug notification because you are a member of OpenERP
Accounting Experts, which is subscribed to a duplicate bug report
(1021321).
https://bugs.launchpad.net/bugs/1000195

Title:
  Performance issue in invoice analysis

Status in OpenERP Addons (modules):
  Fix Released

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