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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0022633
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformmajoralways2012-12-19 12:162013-10-03 19:12
ReporterjvazquezView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0022633: Results pagination performance in generated windows decreases with an increasing number of records

DescriptionOpenbravo generated windows use a query that is not very efficient to paginate results when scrolling. The performance of this query decreases exponentially when a window has ten of thousands or hundreds of thousands of records.
Steps To ReproduceSet up an Openbravo instance with a table that has hundreds of thousands of records, i.e. the product table.
Activate the logging of the HQL queries being executed as indicated in http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/Common_Issues,_Tips_and_Tricks#How_can_I_see_what_SQL_is_executed. [^]
Log in into the ERP, open the product window, and look for the query executed to paginate and show the results in the window, that should be something like
"e315491f 558895 [http-8084-1] DEBUG org.hibernate.SQL - select * from ( select row_.*, rownum rownum_ from ( select product0_.M_Product_ID... product0_.M_Product_ID ) row_ where rownum <= ?) where rownum_ > ?"
Now execute this query in your database entering high numbers (i.e. 100000, 200000) and low numbers (i.e. 1, 10) and compare the execution time for both queries. Time will increase dramatically when numbers increase. It seems to me that the query has to iterate through the results up to the number 100000 record, then iterate to the number 200000 record and return the range.
Proposed SolutionChange the way for paginating results in generated windows. See http://stackoverflow.com/questions/6618366/improving-offset-performance-in-postgresql/6619087#6619087 [^]
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-12-19 12:16 jvazquez New Issue
2012-12-19 12:16 jvazquez Assigned To => AugustoMauch
2012-12-19 12:16 jvazquez Modules => Core
2012-12-19 12:16 jvazquez Triggers an Emergency Pack => No
2013-05-22 06:31 eintelau Issue Monitored: eintelau
2013-05-22 09:02 jvazquez Tag Attached: Performance
2013-05-22 09:05 jvazquez Steps to Reproduce Updated View Revisions
2013-10-03 19:12 iciordia Proposed Solution updated


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker