Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0025682
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] I. Performancemajorhave not tried2014-02-07 07:462014-02-07 14:09
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionc73830693d65
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP22.2SCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0025682: Missing index for c_invoice table c_order_id column makes at least c_order_trg + c_order_trg2 slow

DescriptionBoth those triggers do an update to c_invoice which is looked up via c_invoice.c_order_id to synchronize a few fields from c_order to c_invoice.

with 700k rows in c_invoice just this one update is taking 230ms each time.

Steps To ReproduceObserve trigger runtime in database with many invoices.

i.e. set track_functions = 'all' in pg config
Then after running code executing the update
check trigger runtime with select * from pg_stat_user_functions order by total_time desc
Proposed SolutionAdd proposed trigger

create index c_invoice_order on c_invoice(c_order_id);
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0025683 closeddmiguelez c_order_trg is doing updates to c_invoice when not needed 

-  Notes
(0064009)
shuehner (administrator)
2014-02-07 07:52

I think this fix should be included in the next MP30.x emergency mp as i see no regression risk and it is a useful performance fix to get out to every user.
(0064016)
hgbot (developer)
2014-02-07 14:01

Repository: erp/devel/pi
Changeset: c73830693d6559bcdcc997321ad3d93f47436f6b
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Feb 07 12:56:56 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c73830693d6559bcdcc997321ad3d93f47436f6b [^]

Fixed 25682: Add index on c_invoice.c_order_id to speedup triggers
c_order_trg & c_order_trg2

---
M src-db/database/model/tables/C_INVOICE.xml
---
(0064017)
dmiguelez (developer)
2014-02-07 14:09

Code Review + Testing Ok

- Issue History
Date Modified Username Field Change
2014-02-07 07:46 shuehner New Issue
2014-02-07 07:46 shuehner Assigned To => AugustoMauch
2014-02-07 07:46 shuehner Modules => Core
2014-02-07 07:46 shuehner Triggers an Emergency Pack => No
2014-02-07 07:49 shuehner Relationship added related to 0025683
2014-02-07 07:52 shuehner Note Added: 0064009
2014-02-07 08:03 alostale Tag Attached: Performance
2014-02-07 08:03 alostale Assigned To AugustoMauch => dmiguelez
2014-02-07 12:33 priyam Issue Monitored: priyam
2014-02-07 14:01 hgbot Checkin
2014-02-07 14:01 hgbot Note Added: 0064016
2014-02-07 14:01 hgbot Status new => resolved
2014-02-07 14:01 hgbot Resolution open => fixed
2014-02-07 14:01 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c73830693d6559bcdcc997321ad3d93f47436f6b [^]
2014-02-07 14:01 shuehner Assigned To dmiguelez => shuehner
2014-02-07 14:09 dmiguelez Review Assigned To => dmiguelez
2014-02-07 14:09 dmiguelez Note Added: 0064017
2014-02-07 14:09 dmiguelez Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker