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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Optimizer not using index when query param starts with double backslash

user7675387Dec 2 2018 — edited Dec 2 2018

Hi,

we are using Oracle 11g and have some problems with a simple query.

The is a table T with the fields AID (NUMBER(24,8)) and AF (VARCHAR2(240 BYTE)).

Both fields are indexed.

When doing a SELECT like

SELECT * FROM T WHERE AID=382 AND AF = '\\domain\test\1123.pdf';

The indexes are not used and the query tooks 3 seconds..

When doing a SELECT like

SELECT * FROM T WHERE AID=382 AND AF = 'a\\domain\test\1123.pdf';

The indexes are used and the query tooks 0.01 seconds.

So when the AF param starts with '\\' the indexes are not used.

What happens here?

Thanks

Tom

This post has been answered by Jonathan Lewis on Dec 2 2018
Jump to Answer

Comments

Processing

Post Details

Added on Dec 2 2018
3 comments
431 views