How do you increase the performance of %LIKE operator

Showing Answers 1 - 2 of 2 Answers

Rakesh Gautam

  • Jul 5th, 2005
 

never user '%' before a seraching word 
e.g '%TABLE%'  
 
Always uses 'TABLE%' 

  Was this answer useful?  Yes

J Lehew

  • Aug 25th, 2005
 

The wildcard char % can be placed in one of three ways: 
 
%searchwordhere%  
searchwordhere%  
%searchwordhere 
 
The searchwordhere% is the fastest because it can use an index if one is specified on that column. The other two %searchwordhere%, and %searchwordhere would never use the index even if one is specified and thus result in slow table scans.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions