← Back to team overview

openerp-india team mailing list archive

[Bug 932524] [NEW] account invoice report: massive performance problems

 

Public bug reported:

IMHO produces a carthesian product

account/report/ account_invoice_report.py
row 166
                res_currency_rate cr
                where cr.id in (select id from res_currency_rate cr2  where (cr2.currency_id = ai.currency_id)
                and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) limit 1)

there as some 4000 entries in res_currency_rate
it never returns

EXPLAIN sais it will return > 1mio records
for 400 invoicese
500 invoice lines

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
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/932524

Title:
  account invoice report: massive performance problems

Status in OpenERP Addons (modules):
  New

Bug description:
  IMHO produces a carthesian product

  account/report/ account_invoice_report.py
  row 166
                  res_currency_rate cr
                  where cr.id in (select id from res_currency_rate cr2  where (cr2.currency_id = ai.currency_id)
                  and ((ai.date_invoice is not null and cr.name <= ai.date_invoice) or (ai.date_invoice is null and cr.name <= NOW())) limit 1)

  there as some 4000 entries in res_currency_rate
  it never returns

  EXPLAIN sais it will return > 1mio records
  for 400 invoicese
  500 invoice lines

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


Follow ups

References