Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

SmartGWT SQL generation for Oracle enhancement suggestion: Parameter binding

$
0
0
Hi Isomorphic,

I'm using current SmartGWT 4.1p and have a SQLDataSource-subclass, that adds a tenant_id (and sometimes a user_id) whereClause to every request.

This means that even the simplest display of a databound component results in a different SQL statement sent to the database.

With respect to the Oracle 11.2 docs these queries result in different sqlIds in Oracle, each needing a hard parse. This is true even if they result in the same execution plan afterwards. As these requests go to complex views in my case, they take some time (3 sec) the first time executed, while subsequent executions take only some milliseconds for my testdata.

In order to make queries like
Code:

SELECT col1, col2, col3 FROM employees WHERE tenant_id = 123;
SELECT col1, col2, col3 FROM employees WHERE tenant_id = 456;

use the same sqlId, they must be changed to
Code:

SELECT col1, col2, col3 FROM employees WHERE tenant_id = :a;
Is there already an option in server.properties that enables parameter binding? Do you plan to support this for Oracle/JDBC in general?

Thank you & Best regards,
Blama

Viewing all articles
Browse latest Browse all 4756

Latest Images

Trending Articles



Latest Images