Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009837Openbravo ERPA. Platformpublic2009-07-10 19:402009-07-13 12:58
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
pi 
2.40MP7 
Core
No
0009837: ProductComplete selector is too slow with many products.
This selector is too slow with many products (i.e. 100k or 100m). Happens on both oracle and postgres.
No tags attached.
blocks defect 0009836 closed shuehner ProductComplete selector is too slow with many products. 
Issue History
2009-07-10 19:40shuehnerTypedefect => backport
2009-07-10 19:40shuehnerfix_in_branch => 2.40
2009-07-10 19:43hgbotCheckin
2009-07-10 19:43hgbotNote Added: 0018120
2009-07-10 19:43hgbotStatusscheduled => resolved
2009-07-10 19:43hgbotResolutionopen => fixed
2009-07-10 19:43hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/3d4dc5b588f721ce8a786009dd38de1ed19188e7 [^]
2009-07-10 19:53shuehnerNote Added: 0018123
2009-07-13 12:57psarobeFixed in Version => 2.40MP7
2009-07-13 12:58psarobeStatusresolved => closed

Notes
(0018120)
hgbot   
2009-07-10 19:43   
Repository: erp/stable/2.40
Changeset: 3d4dc5b588f721ce8a786009dd38de1ed19188e7
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Jul 10 19:43:16 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40/rev/3d4dc5b588f721ce8a786009dd38de1ed19188e7 [^]

Fixed 9837: Optimize ProductComplete selector performance with many products
- When use with command=KEY limit to two rows, as only one row content, and count={0,1,2} is needed here
- Better placement of limit/offset on postgres
- Better placement of rownum <= clause on oracle
- Remove unneded joins from count queries: countRowsNotStored & countRowsNotStoredTrl
- Merge these two count queries as they were identical after the last step

---
M src/org/openbravo/erpCommon/info/ProductComplete.java
M src/org/openbravo/erpCommon/info/ProductComplete_data.xsql
---
(0018123)
shuehner   
2009-07-10 19:53   
for QA: this change affects all of the following use cases:

1.) When used with direct search via enter key (i.e. in Warehouse Management -> Physical Inventory)
a.) no row is found for the product value you entered (i.e. xx)
b.) exactly one row is found and the selector-popup is opened and closed immediately and the values are used in the calling page (i.e. hat)
c.) more than one row is found and the selector popup is opened and displays the products filtered by the partial name entered (i.e. b)

2.) When opened normally
Testing if ordering, filtering, scrolling works as expected for the following combinations
a.) Without setting 'With stock' in language en_US
b.) With setting 'With stock' in language en_US
c.) Without setting 'With stock' in language different from en_US
d.) With setting 'With stock' in language different from en_US

Testing is needed on both postgres and oracle