Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0029943 | Openbravo ERP | Y. DBSourceManager | public | 2015-05-20 13:28 | 2019-04-02 17:57 |
|
Reporter | vmromanos | |
Assigned To | alostale | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR19Q2 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0029943: support to define DB functions volatility |
Description | Right now the db functions created by the dbsm have the annotation VOLATILE.
It would be great to support also the STABLE keyword, which returns always the same result when the same parameters are passed.
Definition from http://www.postgresql.org/docs/9.1/static/sql-createfunction.html [^] :
"STABLE indicates that the function cannot modify the database, and that within a single table scan it will consistently return the same result for the same argument values, but that its result could change across SQL statements. This is the appropriate selection for functions whose results depend on database lookups, parameter variables (such as the current time zone), etc. (It is inappropriate for AFTER triggers that wish to query rows modified by the current command.) Also note that the current_timestamp family of functions qualify as stable, since their values do not change within a transaction."
This flag could be used in some common functions to drastically increase the performance of processes where these functions are involved. Example of candidate functions: ad_isorgincluded, ad_org_isinnaturaltree, etc.
See project: http://wiki.openbravo.com/wiki/Projects:Configurable_DB_Functions_Volatility [^] |
Steps To Reproduce | NA |
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0038179 | | closed | alostale | cannot restore pg dump | related to | feature request | 0030179 | 3.0PR15Q4 | closed | AugustoMauch | DBSourceManager support indexes with functions | related to | defect | 0029664 | 3.0PR15Q3 | closed | vmromanos | Create Price List process is slow | blocks | defect | 0039349 | | closed | AtulOpenbravo | Return from Customer pick/edit lines process takes more time to be loaded on an environment with thousands of orders. | blocks | defect | 0040865 | | closed | AtulOpenbravo | Set VOLATILITY LEVEL for Database functions |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-05-20 13:28 | vmromanos | New Issue | |
2015-05-20 13:28 | vmromanos | Assigned To | => platform |
2015-05-20 13:28 | vmromanos | Modules | => Core |
2015-05-20 13:28 | vmromanos | Triggers an Emergency Pack | => No |
2015-05-20 13:36 | vmromanos | Description Updated | bug_revision_view_page.php?rev_id=8592#r8592 |
2015-05-20 13:36 | vmromanos | Tag Attached: Performance | |
2015-05-20 15:53 | vmromanos | Relationship added | related to 0029664 |
2015-05-21 18:34 | shuehner | Issue Monitored: shuehner | |
2015-05-21 18:34 | shuehner | Note Added: 0077633 | |
2018-10-19 08:09 | vmromanos | Relationship added | blocks 0039349 |
2019-03-05 14:04 | alostale | Relationship added | related to 0038179 |
2019-03-20 13:40 | alostale | Relationship added | related to 0030179 |
2019-04-02 09:45 | alostale | Summary | Add STABLE annotation support to db functions => support to define DB functions volatility |
2019-04-02 09:46 | alostale | Review Assigned To | => caristu |
2019-04-02 09:46 | alostale | Assigned To | platform => alostale |
2019-04-02 09:46 | alostale | Description Updated | bug_revision_view_page.php?rev_id=18567#r18567 |
2019-04-02 09:57 | hgbot | Checkin | |
2019-04-02 09:57 | hgbot | Note Added: 0110960 | |
2019-04-02 09:57 | hgbot | Status | new => resolved |
2019-04-02 09:57 | hgbot | Resolution | open => fixed |
2019-04-02 09:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d6ffa58fa832a1ca1e43767282a009e2c7ff5ab1 [^] |
2019-04-02 09:58 | hgbot | Checkin | |
2019-04-02 09:58 | hgbot | Note Added: 0110961 | |
2019-04-02 09:58 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/d6ffa58fa832a1ca1e43767282a009e2c7ff5ab1 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/7e0ba43031c75b49de7b3d6dd70c2112fe9f8607 [^] |
2019-04-02 17:57 | caristu | Note Added: 0110969 | |
2019-04-02 17:57 | caristu | Status | resolved => closed |
2019-04-02 17:57 | caristu | Fixed in Version | => 3.0PR19Q2 |
2019-05-13 18:16 | AtulOpenbravo | Relationship added | blocks 0040865 |
Notes |
|
|
I think that may happen as part of adding support 'Functional indices' (tentatively thought of q4)
As you can only use functions for functional indices which marked as stable (at leasT) |
|
|
(0110960)
|
hgbot
|
2019-04-02 09:57
|
|
|
|
(0110961)
|
hgbot
|
2019-04-02 09:58
|
|
Repository: erp/devel/dbsm-main
Changeset: 7e0ba43031c75b49de7b3d6dd70c2112fe9f8607
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 02 09:54:41 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/7e0ba43031c75b49de7b3d6dd70c2112fe9f8607 [^]
fixes 29943: support to define DB functions volatility
---
M .classpath
M .settings/org.eclipse.jdt.core.prefs
M build.xml
M src-test/model/functions/SIMPLE_FUNCTION.xml
M src-test/src/log4j2-test.xml
M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
M src/mapping.xml
M src/org/apache/ddlutils/io/DatabaseIO.java
M src/org/apache/ddlutils/model/Function.java
M src/org/apache/ddlutils/platform/ModelLoaderBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
M src/org/apache/ddlutils/platform/oracle/OracleBuilder.java
M src/org/apache/ddlutils/platform/oracle/OracleModelLoader.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
A src-test/model/functions/IMMUTABLE_FUNCTION.xml
A src-test/model/functions/STABLE_FUNCTION.xml
A src-test/src/org/openbravo/dbsm/test/model/FunctionVolatility.java
A src/org/apache/ddlutils/io/DBSMObjectStringConverter.java
---
|
|
|
|
|