Skip to Main Content

SQL & PL/SQL

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.

SQL Performance tuning with wildcard Like condition

903085May 27 2012 — edited May 27 2012
Hi,

I have performance issue with SQL query.

When I am using "where emp_name like '%im%' " query is taking longer time than when I use "where emp_name like 'im%' " .

With former condition query takes 40 sec , with later it takes around 1.5 sec.

Both returns almost same no. of rows. We have function based index created on emp_name column.

With wildcard at both ends query goes for full table scan.

Can any one please suggest way so that query responce time can be reduced.?

I even tried using hints but still it is going for full table scan instead of using index.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2012
Added on May 27 2012
3 comments
3,300 views