SQL Performance tuning with wildcard Like condition
903085May 27 2012 — edited May 27 2012Hi,
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.