Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0035296 | Openbravo ERP | Y. DBSourceManager | public | 2017-02-17 12:07 | 2017-03-15 20:19 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR17Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
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 | 0035296: pl functions with out and defaults params can be slow to standardize |
Description | If there are PL functions with many parameters (>25) some of having default values and some other begin output parameters and there is another PL function that invokes it not passing all of the parameters to make use of the defaults, export.database take ages to complete.
The problem is caused because dbsm translates function Oracle function invocation for functions with out params in "select * into outp from function(inp)", this transformation is done with regexps, with many parameters applying the regexp in case it does not match is really slow.
See examples: https://gist.github.com/alostale/ddfd1ca890e3dbae3c3558fc2fa1bfc6 [^] |
Steps To Reproduce | 1. patch pi (rev aff21cc5e768) with attached diff
2. update.database
3. export.database -> it can take hours to complete function standardization part |
Proposed Solution | Because the cases where it is slow is actually the ones that will not match, it is possible to know in advance these case by just counting the number of parameters the lines has, so in these cases the expression does not require to be applied. |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0035284 | | closed | alostale | update.database unnecessarily standardizes DB PL code | blocks | defect | 0035297 | | closed | alostale | PL functions with optional constant params are not correctly standardized |
|
Attached Files | m_get_stock_param1.diff (977) 2017-02-17 12:08 https://issues.openbravo.com/file_download.php?file_id=10460&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2017-02-17 12:07 | alostale | New Issue | |
2017-02-17 12:07 | alostale | Assigned To | => platform |
2017-02-17 12:07 | alostale | OBNetwork customer | => No |
2017-02-17 12:07 | alostale | Modules | => Core |
2017-02-17 12:07 | alostale | Triggers an Emergency Pack | => No |
2017-02-17 12:08 | alostale | File Added: m_get_stock_param1.diff | |
2017-02-17 12:08 | alostale | Assigned To | platform => alostale |
2017-02-17 12:08 | alostale | Status | new => acknowledged |
2017-02-17 12:09 | alostale | Relationship added | related to 0035284 |
2017-02-17 12:09 | alostale | Tag Attached: Performance | |
2017-02-17 12:14 | alostale | Relationship added | blocks 0035297 |
2017-02-20 14:49 | hgbot | Checkin | |
2017-02-20 14:49 | hgbot | Note Added: 0094469 | |
2017-02-20 14:49 | hgbot | Checkin | |
2017-02-20 14:49 | hgbot | Note Added: 0094470 | |
2017-02-20 14:49 | hgbot | Status | acknowledged => resolved |
2017-02-20 14:49 | hgbot | Resolution | open => fixed |
2017-02-20 14:49 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/dbsm-main/rev/05dcb0005fc0934fc4bfaefedf914bf8a960fb33 [^] |
2017-02-20 14:49 | hgbot | Checkin | |
2017-02-20 14:49 | hgbot | Note Added: 0094473 | |
2017-02-20 14:49 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/05dcb0005fc0934fc4bfaefedf914bf8a960fb33 [^] => http://code.openbravo.com/erp/devel/pi/rev/490d93599594dac190b9711b1a43054ad51cf025 [^] |
2017-02-20 14:50 | alostale | Review Assigned To | => caristu |
2017-02-28 09:28 | caristu | Note Added: 0094654 | |
2017-02-28 09:28 | caristu | Status | resolved => closed |
2017-02-28 09:28 | caristu | Fixed in Version | => 3.0PR17Q2 |
2017-03-15 20:19 | hudsonbot | Checkin | |
2017-03-15 20:19 | hudsonbot | Note Added: 0095197 | |