Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0020415 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2012-05-04 10:39 | 2012-05-25 12:12 | |||
Reporter | marvintm | View Status | public | |||||
Assigned To | marvintm | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0MP12 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 6d9804bf7aef | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0020415: Make update.database faster by generating a batch of statements instead of executing one by one | |||||||
Description | One possible idea to make update.database faster consists in making a big batch of statements and execute them at the same time, instead of executing them one by one. This idea should be used primarily on the parts which are currently slow enough to make this worthwhile. This parts right now are considered to be: - The dropping and creation of foreign keys and triggers - The dropping and creation of not null constraints. As doing this for Oracle would require a refactor of the methods which drop and create foreign keys and triggers, for now this change will only be done on PostgreSQL. | |||||||
Steps To Reproduce | Just execute update.database before the change and after it. Notice that the execution is faster with the change. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0048366) hgbot (developer) 2012-05-04 10:49 |
Repository: erp/devel/dbsm-main Changeset: 85b10db2ef3e03be997a008b8c34b7676dc9df2f Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri May 04 10:49:16 2012 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/85b10db2ef3e03be997a008b8c34b7676dc9df2f [^] Fixed issue 20415. Added batching for some parts of update.database in PostgreSQL to improve performance. - Added a method (evaluateBatchRealBatch) which works like evaluateBatch, but instead of executing the commands one by one, executes them in a batch. This method is not compatible with 'forced' commands. - Changed some calls to evaluateBatch to the new method, in the PostgreSQL execution flow. This will improve the performance of those parts. --- M src/org/apache/ddlutils/platform/PlatformImplBase.java M src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java --- |
(0048368) hgbot (developer) 2012-05-04 11:07 |
Repository: erp/devel/pi Changeset: 6d9804bf7aef36b9aa29020501690d40ca255719 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri May 04 11:06:22 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/6d9804bf7aef36b9aa29020501690d40ca255719 [^] Fixed issue 20415. Added batching for some parts of update.database in PostgreSQL to improve performance. > - Added a method (evaluateBatchRealBatch) which works like evaluateBatch, but instead of executing the commands one by one, executes them in a batch. This method is not compatible with 'forced' commands. > - Changed some calls to evaluateBatch to the new method, in the PostgreSQL execution flow. This will improve the performance of those parts. --- M src-db/database/lib/dbsourcemanager.jar --- |
(0048378) hgbot (developer) 2012-05-04 13:32 |
Repository: erp/devel/dbsm-main Changeset: 3fba02a91791643aa662fd1f84f76e0ba420fa7c Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri May 04 13:31:39 2012 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3fba02a91791643aa662fd1f84f76e0ba420fa7c [^] Related to issue 20415. The new method will not be used for any method in Oracle --- M src/org/apache/ddlutils/platform/PlatformImplBase.java --- |
(0048379) hgbot (developer) 2012-05-04 13:36 |
Repository: erp/devel/pi Changeset: d2161c228cc9dbe27a68991f599bf76883262713 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Fri May 04 13:35:56 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/d2161c228cc9dbe27a68991f599bf76883262713 [^] Related to issue 20415. The new method will not be used for any method in Oracle --- M src-db/database/lib/dbsourcemanager.jar --- |
(0048381) AugustoMauch (administrator) 2012-05-04 14:00 |
Code reviewed and verified in pi@d2161c228cc9 |
(0048636) hgbot (developer) 2012-05-14 20:29 |
Repository: erp/devel/pi Changeset: 498399deee0d63454b37ec1ee6e2d2a49ace4ee5 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Mon May 14 20:29:18 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/498399deee0d63454b37ec1ee6e2d2a49ace4ee5 [^] Related to issue 20415. The old evaluateBatch will now be used if there is an error. > Also, update.database.script has been improved so that it includes some things which are now done by update.database --- M src-db/database/lib/dbsourcemanager.jar --- |
(0048637) hgbot (developer) 2012-05-14 20:30 |
Repository: erp/devel/dbsm-main Changeset: 1ba8239f5aff0ed27f4a8a2bd5dfb10da3102c22 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Mon May 14 20:21:14 2012 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/1ba8239f5aff0ed27f4a8a2bd5dfb10da3102c22 [^] Related to issue 20415. The old evaluateBatch will now be used if there is an error. Also, update.database.script has been improved so that it includes some things which are now done by update.database --- M src/org/apache/ddlutils/Platform.java M src/org/apache/ddlutils/platform/PlatformImplBase.java M src/org/openbravo/ddlutils/task/AlterXML2SQL.java --- |
(0048688) hgbot (developer) 2012-05-16 11:51 |
Repository: erp/devel/dbsm-main Changeset: 53990057f9337c73cb1c1705fa2957b556d901a4 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Wed May 16 11:51:26 2012 +0200 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/53990057f9337c73cb1c1705fa2957b556d901a4 [^] Related to issue 20415. Moved the closeStatement to a safer place. Fixed wrong method in update.database.script --- M src/org/apache/ddlutils/platform/PlatformImplBase.java M src/org/openbravo/ddlutils/task/AlterXML2SQL.java --- |
(0048689) hgbot (developer) 2012-05-16 11:52 |
Repository: erp/devel/pi Changeset: 7e1cede2db376153bbe01c3e43750fcf8991f1c2 Author: Antonio Moreno <antonio.moreno <at> openbravo.com> Date: Wed May 16 11:52:03 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/7e1cede2db376153bbe01c3e43750fcf8991f1c2 [^] Related to issue 20415. Moved the closeStatement to a safer place. Fixed wrong method in update.database.script --- M src-db/database/lib/dbsourcemanager.jar --- |
(0048693) AugustoMauch (administrator) 2012-05-16 12:45 |
The code of the update has been reviewed and verified in pi@e260a84b287f. The following has been tested in order to test that if there is an error the rest of the batch will be executed: - Remove from the database a not null constraint of a field (i.e. the name property of c_uom) - Modify a registry so it stores null in that field (i.e. update c_uom set name = null where name = 'Year'. - Execute ant smartbuild -Dlocal=no -Dforce=yes. The first time the system will try to enable all the not null restrictions at once. It will not be able to enable the not null restriction of the name field of c_uom. In order to make sure that the rest of the Batch is executed, it will be executed one query at a time. - Execute ant export.database. Only c_uom.xml should have changed, meaning that the rest of the not null restrictions have been enabled. |
(0049020) hudsonbot (viewer) 2012-05-25 12:09 |
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 |
(0049025) hudsonbot (viewer) 2012-05-25 12:09 |
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 |
(0049125) hudsonbot (viewer) 2012-05-25 12:12 |
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 |
(0049143) hudsonbot (viewer) 2012-05-25 12:12 |
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 |
![]() |
|||
Date Modified | Username | Field | Change |
2012-05-04 10:39 | marvintm | New Issue | |
2012-05-04 10:39 | marvintm | Assigned To | => marvintm |
2012-05-04 10:39 | marvintm | Modules | => Core |
2012-05-04 10:39 | marvintm | OBNetwork customer | => No |
2012-05-04 10:49 | hgbot | Checkin | |
2012-05-04 10:49 | hgbot | Note Added: 0048366 | |
2012-05-04 10:49 | hgbot | Status | new => resolved |
2012-05-04 10:49 | hgbot | Resolution | open => fixed |
2012-05-04 10:49 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/85b10db2ef3e03be997a008b8c34b7676dc9df2f [^] |
2012-05-04 11:07 | hgbot | Checkin | |
2012-05-04 11:07 | hgbot | Note Added: 0048368 | |
2012-05-04 11:07 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/85b10db2ef3e03be997a008b8c34b7676dc9df2f [^] => http://code.openbravo.com/erp/devel/pi/rev/6d9804bf7aef36b9aa29020501690d40ca255719 [^] |
2012-05-04 13:32 | hgbot | Checkin | |
2012-05-04 13:32 | hgbot | Note Added: 0048378 | |
2012-05-04 13:36 | hgbot | Checkin | |
2012-05-04 13:36 | hgbot | Note Added: 0048379 | |
2012-05-04 14:00 | AugustoMauch | Note Added: 0048381 | |
2012-05-04 14:00 | AugustoMauch | Status | resolved => closed |
2012-05-04 14:00 | AugustoMauch | Fixed in Version | => 3.0MP12 |
2012-05-14 20:29 | hgbot | Checkin | |
2012-05-14 20:29 | hgbot | Note Added: 0048636 | |
2012-05-14 20:30 | hgbot | Checkin | |
2012-05-14 20:30 | hgbot | Note Added: 0048637 | |
2012-05-16 11:51 | hgbot | Checkin | |
2012-05-16 11:51 | hgbot | Note Added: 0048688 | |
2012-05-16 11:52 | hgbot | Checkin | |
2012-05-16 11:52 | hgbot | Note Added: 0048689 | |
2012-05-16 12:45 | AugustoMauch | Note Added: 0048693 | |
2012-05-25 12:09 | hudsonbot | Checkin | |
2012-05-25 12:09 | hudsonbot | Note Added: 0049020 | |
2012-05-25 12:09 | hudsonbot | Checkin | |
2012-05-25 12:09 | hudsonbot | Note Added: 0049025 | |
2012-05-25 12:12 | hudsonbot | Checkin | |
2012-05-25 12:12 | hudsonbot | Note Added: 0049125 | |
2012-05-25 12:12 | hudsonbot | Checkin | |
2012-05-25 12:12 | hudsonbot | Note Added: 0049143 |
Copyright © 2000 - 2009 MantisBT Group |