Subject | Index for query |
---|---|
Author | Claudio Romero |
Post date | 2011-02-22T19:25:52Z |
With this index
CREATE INDEX IDX_table_char ON table computed by (cast(integer_field
as varchar(10)));
this query works with PLAN (P_UCM_T INDEX (IDX_TABLE_CHAR))
SELECT * FROM table where cast(CODIGO as varchar(10)) like '21095%'
But this query
SELECT * FROM table where integer_field like '21095%'
Use PLAN NATURAL, how can index this field?
Regards
CREATE INDEX IDX_table_char ON table computed by (cast(integer_field
as varchar(10)));
this query works with PLAN (P_UCM_T INDEX (IDX_TABLE_CHAR))
SELECT * FROM table where cast(CODIGO as varchar(10)) like '21095%'
But this query
SELECT * FROM table where integer_field like '21095%'
Use PLAN NATURAL, how can index this field?
Regards