Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

index on UPPER(field) does not work

376537May 7 2004 — edited May 7 2004
I cannot seem to enable function-based indexes, anyone can help here ?

Oracle 8.1.7 (latest patch)

I have a table 63K rows big.

trying to index on either lower() or upper() of a column named 'name', varchar2(50).

no matter what I do, the search by the function is slow and the explain plan shows a full scan.

the user has a DBA role, and I even added the system privilege QUERY_REWRITE to no avail.

here are the statements I used:

CREATE INDEX PRODUCT3_IDX on product(UPPER(name));

select * from product where UPPER(name) = 'ABC.COM';
(NO ROWS, SLOW RESPONSE)

explain plan set statement_id = 'JK' for
select * from product where UPPER(name) = 'ABC.COM';
PLAN
------------------------------------------------------------------------------------
1354 SELECT STATEMENT . CHOOSE Cost = 1354 Rows Expected = 640
1 TABLE ACCESS FULL CUSTOMER.PRODUCT ANALYZED Cost = 1354 Rows Expected = 640

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2004
Added on May 7 2004
3 comments
544 views