Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013775Openbravo ERPI. Performancepublic2010-06-24 18:352010-07-24 00:00
adrianromero 
adrianromero 
urgentmajoralways
closedfixed 
5
 
2.50MP20 
Core
No
0013775: Business partners and Products take a lot of time to insert when the database is big
If for example we have a database with more than 100000 business partners or products, inserting a new Business partner o a new product takes a lot of time.

This is particularly problematic when populating the database with new Business partners or products an the volume of data to import is very big
The problem is because the triggers for these tables executes a query for the corresponding tree tables that are not optimized. A new index is required to optimize this query. For example the index required for Business partners is:

    CREATE INDEX AD_TREENODEBP_PARENT2 ON AD_TreeNodeBP(AD_TREE_ID, PARENT_ID);

A similar trigger must be added for the AD_TREENODEPR table.
No tags attached.
Issue History
2010-06-24 18:35adrianromeroNew Issue
2010-06-24 18:35adrianromeroAssigned To => adrianromero
2010-06-24 19:00adrianromeroStatusnew => scheduled
2010-06-24 19:00adrianromerofix_in_branch => pi
2010-07-15 15:45hgbotCheckin
2010-07-15 15:45hgbotNote Added: 0029349
2010-07-15 15:45hgbotStatusscheduled => resolved
2010-07-15 15:45hgbotResolutionopen => fixed
2010-07-15 15:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/92dd3f29a38e767b25ec5e4c57835af0c4a67074 [^]
2010-07-15 15:47hgbotCheckin
2010-07-15 15:47hgbotNote Added: 0029350
2010-07-15 15:47hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/92dd3f29a38e767b25ec5e4c57835af0c4a67074 [^] => http://code.openbravo.com/erp/devel/api-checks/rev/cd2f604911ad51aabb50fcc18875e95596887e34 [^]
2010-07-15 15:51adrianromeroNote Added: 0029351
2010-07-16 06:55hudsonbotCheckin
2010-07-16 06:55hudsonbotNote Added: 0029360
2010-07-23 12:14psarobeNote Added: 0029527
2010-07-23 12:14psarobeStatusresolved => closed
2010-07-24 00:00anonymoussf_bug_id0 => 3033803

Notes
(0029349)
hgbot   
2010-07-15 15:45   
Repository: erp/devel/pi
Changeset: 92dd3f29a38e767b25ec5e4c57835af0c4a67074
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jul 15 15:44:44 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/92dd3f29a38e767b25ec5e4c57835af0c4a67074 [^]

Fixes issue 0013775: Business partners and Products take a lot of time to insert when the database is big

---
M src-db/database/model/tables/AD_TREENODEBP.xml
M src-db/database/model/tables/AD_TREENODEPR.xml
---
(0029350)
hgbot   
2010-07-15 15:47   
Repository: erp/devel/api-checks
Changeset: cd2f604911ad51aabb50fcc18875e95596887e34
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Thu Jul 15 15:47:22 2010 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/cd2f604911ad51aabb50fcc18875e95596887e34 [^]

Fixes issue 0013775: Business partners and Products take a lot of time to insert when the database is big

---
M model/model/tables/AD_TREENODEBP.xml
M model/model/tables/AD_TREENODEPR.xml
---
(0029351)
adrianromero   
2010-07-15 15:51   
* Testing of the issue

In a database with 100000 Business partners and / or 100000 Products. Inserting a new Business partner and / or a new Product is faster

* Other areas affected

The change is just a new index for the Products tree and Business partners tree. Nothing else needs to be verified.
(0029360)
hudsonbot   
2010-07-16 06:55   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/92dd3f29a38e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/616241c8040c [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17888.obx [^]
(0029527)
psarobe   
2010-07-23 12:14   
Code review done