Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020301Openbravo ERPA. Platformpublic2012-04-18 13:062012-05-25 12:10
egoitz 
AugustoMauch 
immediatemajoralways
closedfixed 
5
3.0MP9 
3.0MP123.0MP12 
Core
No
0020301: Bad performance on the old partner selector used on Openbravo 3 on manual forms
Bad performance on the old partner selector used on Openbravo 3 on manual forms.
With a big amount of data the select take about 1 minute to be executed so after 15 seconds the selecotr showns an error saying that the server is taking too much to return data.
-Add 500.000 partners.
-Go to "create shipments from order window"
-Open the selector
* after about 15 sencods you get an error.
Performance
related to defect 00202573.0MP12 closed AugustoMauch The partner selector takes long to show data having more than 600k partners 
diff issue20301.diff (7,942) 2012-04-19 10:21
https://issues.openbravo.com/file_download.php?file_id=5146&type=bug
Issue History
2012-04-18 13:06egoitzNew Issue
2012-04-18 13:06egoitzAssigned To => AugustoMauch
2012-04-18 13:06egoitzModules => Core
2012-04-18 13:06egoitzRelationship addedrelated to 0020257
2012-04-18 13:10egoitzPriorityurgent => immediate
2012-04-18 13:24egoitzNote Added: 0047694
2012-04-19 10:21marvintmFile Added: issue20301.diff
2012-04-19 10:22marvintmNote Added: 0047732
2012-04-23 18:28AugustoMauchTag Attached: Performance
2012-05-08 14:01hgbotCheckin
2012-05-08 14:01hgbotNote Added: 0048448
2012-05-08 14:01hgbotStatusnew => resolved
2012-05-08 14:01hgbotResolutionopen => fixed
2012-05-08 14:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/606b9a33cf29f2ca3cd2693ff3c40b178136e8f2 [^]
2012-05-08 15:27hgbotCheckin
2012-05-08 15:27hgbotNote Added: 0048453
2012-05-16 09:33marvintmStatusresolved => closed
2012-05-16 09:33marvintmFixed in Version => 3.0MP12
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049050
2012-05-25 12:10hudsonbotCheckin
2012-05-25 12:10hudsonbotNote Added: 0049052

Notes
(0047694)
egoitz   
2012-04-18 13:24   
The problem in this case happens also with not too much partners but when some of that partners is assigned in a lot of users on ad_user.c_bpartner_id column.
for example:

1500 partner
1300 user
2300 partner_location

but
There are 171 user with one of the partners
ohter 98 users with other partner
and also 13 users with other partner assgiend.
(0047732)
marvintm   
2012-04-19 10:22   
I've attached a patch which fixes the issue. It will not be pushed to pi until MP12, because we consider it a risky change.
(0048448)
hgbot   
2012-05-08 14:01   
Repository: erp/devel/pi
Changeset: 606b9a33cf29f2ca3cd2693ff3c40b178136e8f2
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 08 14:00:10 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/606b9a33cf29f2ca3cd2693ff3c40b178136e8f2 [^]

Fixes issue 20301: Performance improved on the old bp selector

The SQL query used by the business manual windows business partner selector has been modified to improve its performance. The returned rows do not differ to the ones returned by the previoues version of the selector, there has been only an improval in the performance.

---
M src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql
---
(0048453)
hgbot   
2012-05-08 15:27   
Repository: erp/devel/pi
Changeset: 4f58310ab36cbf5faf8394b2b0f62881589646ec
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 08 15:27:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4f58310ab36cbf5faf8394b2b0f62881589646ec [^]

Related to issue 20301: Fixed Oracle incompatibility.

The xsql of the Business Partner selector was using a query that was compatible with PostgreSQL but not with (WHERE u is null), being 'u' the alias of a table. It has been changed to (WHERE u.isactive is null), which works for PostgreSQL and Oracle.

---
M src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql
---
(0049050)
hudsonbot   
2012-05-25 12:10   
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/5401e185a8b0 [^]

Maturity status: Test
(0049052)
hudsonbot   
2012-05-25 12:10   
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/5401e185a8b0 [^]

Maturity status: Test