Hi,
I'm using smartgwt-power-3.0p.2012-07-17, oracle-11g and several sql datasources.
One datasource has a field:
<field name="amount" type="integer" nativeName="AMOUNT" operator="equals" />
and the generated fetch query looks like:
In database the AMOUNT column has the type NUMBER(16).
Our DBA said that the condition AMOUNT = '12345' should be changed to AMOUNT = 12345 in order to give Oracle the possibility to use the existing index on AMOUNT column.
How can I do that?
I thought that by specifying the integer type the SQLDataSource will generate and expression like AMOUNT = 12345 and not AMOUNT = '12345'.
Regards,
Mihnea
I'm using smartgwt-power-3.0p.2012-07-17, oracle-11g and several sql datasources.
One datasource has a field:
<field name="amount" type="integer" nativeName="AMOUNT" operator="equals" />
and the generated fetch query looks like:
Code:
SELECT * FROM (SELECT /*+ FIRST_ROWS(75) */ a.*, rownum myrownum FROM ( SELECT COLUMN1,AMOUNT FROM TABLE1 WHERE AMOUNT = '12345' ORDER BY COLUMN1 DESC ) a where rownum <=76) WHERE myrownum >= 1
Our DBA said that the condition AMOUNT = '12345' should be changed to AMOUNT = 12345 in order to give Oracle the possibility to use the existing index on AMOUNT column.
How can I do that?
I thought that by specifying the integer type the SQLDataSource will generate and expression like AMOUNT = 12345 and not AMOUNT = '12345'.
Regards,
Mihnea
Comment