Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016621Openbravo ERPI. Performancepublic2011-04-03 13:312013-01-09 18:04
eintelau 
mtaal 
lowminoralways
closedfixed 
5
pi 
3.0RC7 
User Interface Selector
No
0016621: Selector item does an unnecessary count operation on server
When the queries are done to populate a selector, the server is required to carry out a count query in addition to the results query. This count query appears to be unnecessary & can significantly slow down the speed of the call when dealing with large or complex datasets.

(while debugging/monitoring database queries)
1) Open New Sales Order
2) Create a line
3) Click the product combo dropdown
4) Note: that the server does a count query, then a select query but only returns the first 75 results.
Change the selector logic to prevent a count operation occurring on the server.
No tags attached.
related to defect 00166113.0RC7 closed mtaal Initial request done by UI selector element in form view does not use any filters or paging 
related to defect 0016622 closed alostale ReadOnlyDataSourceService doesn't honour the prevent count parameter 
related to defect 00163733.0MP1 closed gorkaion Product selector & grid not usable when system has large number of products active 
patch 16621.patch (1,104) 2011-04-03 13:33
https://issues.openbravo.com/file_download.php?file_id=3819&type=bug
Issue History
2011-04-03 13:31eintelauNew Issue
2011-04-03 13:31eintelauAssigned To => dbaz
2011-04-03 13:31eintelauModules => User Interface Selector
2011-04-03 13:33eintelauFile Added: 16621.patch
2011-04-04 10:56dbazAssigned Todbaz => mtaal
2011-04-05 14:07shuehnerCategoryB. User interface => I. Performance
2011-04-05 17:19shuehnerRelationship addedrelated to 0016611
2011-04-11 10:23alostaleTarget Version => 3.0RC7
2011-04-11 10:23alostaleStatusnew => scheduled
2011-04-11 10:23alostaleAssigned Tomtaal => iperdomo
2011-04-11 10:23alostalefix_in_branch => pi
2011-04-26 12:55gorkaionRelationship addedrelated to 0016622
2011-05-06 19:38dmitry_mezentsevAssigned Toiperdomo => alostale
2011-05-09 13:31alostaleAssigned Toalostale => mtaal
2011-05-10 14:37hgbotCheckin
2011-05-10 14:37hgbotNote Added: 0036629
2011-05-10 14:37hgbotStatusscheduled => resolved
2011-05-10 14:37hgbotResolutionopen => fixed
2011-05-10 14:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/480d397497261c4ccb7e96fd513e8b6ae5b22b29 [^]
2011-05-12 13:31hudsonbotCheckin
2011-05-12 13:31hudsonbotNote Added: 0036873
2011-05-16 16:17shuehnerNote Added: 0037030
2011-05-16 16:17shuehnerStatusresolved => closed
2011-06-17 13:13gorkaionRelationship addedrelated to 0016373
2013-01-08 13:42hgbotCheckin
2013-01-08 13:42hgbotNote Added: 0055376
2013-01-09 05:41hudsonbotCheckin
2013-01-09 05:41hudsonbotNote Added: 0055397
2013-01-09 10:28hgbotCheckin
2013-01-09 10:28hgbotNote Added: 0055412
2013-01-09 18:04hudsonbotCheckin
2013-01-09 18:04hudsonbotNote Added: 0055436

Notes
(0036629)
hgbot   
2011-05-10 14:37   
Repository: erp/devel/pi
Changeset: 480d397497261c4ccb7e96fd513e8b6ae5b22b29
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue May 10 14:36:37 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/480d397497261c4ccb7e96fd513e8b6ae5b22b29 [^]

Fixes issue 16621 Selector item does an unnecessary count operation on server

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0036873)
hudsonbot   
2011-05-12 13:31   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c40e579fcd38 [^]

Maturity status: Test
(0037030)
shuehner   
2011-05-16 16:17   
Tested on pi/pgsql (rev:e991f418d077). Now count is prevent for the normal datasource used for selectors so selector grid shows same behavior as normal grid. For numRecords < fetchPageSize scrollbar is more or less exact. And for bigger numRecords scrollbar extends itself when new data for new page is requested from server.
(0055376)
hgbot   
2013-01-08 13:42   
Repository: erp/devel/pi
Changeset: a6b006e76cb2901e593570592a2a2d78953bbbf8
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Jan 08 18:09:57 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a6b006e76cb2901e593570592a2a2d78953bbbf8 [^]

Fixes Issue 22684 : Only 76 values shown in Custom Query Selector picklist

Modified Custom Query Selector to count the total number of rows.
This is not needed in normal selectors because total rows is calculated irrespective of start row and end row.
Also restored the changeset of issue 16621.

---
M modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/CustomQuerySelectorDatasource.java
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0055397)
hudsonbot   
2013-01-09 05:41   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/195064f93651 [^]

Maturity status: Test
(0055412)
hgbot   
2013-01-09 10:28   
Repository: erp/devel/pi
Changeset: bedb82b9459e1fd7bd1a96303bffc9958752c06b
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Jan 09 14:56:52 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/bedb82b9459e1fd7bd1a96303bffc9958752c06b [^]

Related to issue 22684 : Backout changeset 96927b00ddcc

Backout changeset because it breaks another issue 16621.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0055436)
hudsonbot   
2013-01-09 18:04   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/314b62ac40f7 [^]

Maturity status: Test