Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011055Openbravo ERPY. DBSourceManagerpublic2009-10-20 17:322009-11-19 00:00
shuehner 
shuehner 
highmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0011055: export.database and update.database could be 1min faster always
The two steps:

Reading tables
Reading functions

each take about 30s use non optimized sql statements which could be easily made faster (around 1-2seconds each perhaps)

Example: reading functins

Change the upper(proname) = upper(?) to a simple proname = ? from the qeuries reading the function derails

and also remove the upper(proname) from the query reading the list of functions (to match the case).

Add an toUppercase when storing the procedure name into the Function object to not change behavior of other java dbsm code.

Apply the same idea to reading tables
No tags attached.
Issue History
2009-10-20 17:32shuehnerNew Issue
2009-10-20 17:32shuehnerAssigned To => marvintm
2009-10-20 17:32shuehnerNote Added: 0021223
2009-10-20 17:32shuehnerIssue Monitored: shuehner
2009-11-11 18:45shuehnerNote Added: 0021735
2009-11-11 18:46shuehnerAssigned Tomarvintm => shuehner
2009-11-11 19:23hgbotCheckin
2009-11-11 19:23hgbotNote Added: 0021736
2009-11-11 19:23hgbotStatusnew => resolved
2009-11-11 19:23hgbotResolutionopen => fixed
2009-11-11 19:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9be52538e37fed0a8ee84d831f769c94fa0ccf32 [^]
2009-11-18 11:12marvintmNote Added: 0021955
2009-11-18 11:12marvintmStatusresolved => closed
2009-11-19 00:00anonymoussf_bug_id0 => 2900149

Notes
(0021223)
shuehner   
2009-10-20 17:32   
Note: Speedup tested on postgres only, check if a similar change is useful in the oracle specified sql's
(0021735)
shuehner   
2009-11-11 18:45   
The Read tables part of the theoretical speedup cannot be done easily.

The the "Reading functions..." takes about 0.5s on oracle and about 30s on postgres. The 30s on postgres can be speed up to 0.5
(0021736)
hgbot   
2009-11-11 19:23   
Repository: erp/devel/pi
Changeset: 9be52538e37fed0a8ee84d831f769c94fa0ccf32
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Nov 11 19:22:31 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9be52538e37fed0a8ee84d831f769c94fa0ccf32 [^]

Fixed 11055: optimize 'Reading functions...' on postgres, now about 30s faster

---
M src-db/database/lib/dbsourcemanager.jar
---
(0021955)
marvintm   
2009-11-18 11:12   
The changes are correct, and the export.database is definitely much faster.