View Single Post

   
  #1 (permalink)  
Old 02-29-2008, 07:30 AM
Phillip
 
Posts: n/a
Default Speed cost for using "or" clause and functions on join statement

Select member
from NameList
Inner join Members
on (Left(Namelist.NameID,5) = Members.ID
OR (left(namelist.SSN,9) = Members.ssn
OR (Left(namelist.CustID,9) + '*01' = Members.CustID)
where
namelist.name <> ''

How do I speed up a process like this? Can I create indexes on the
members table based on a function
Like an index based on the left(members.id,5)

or should these statements go into the where clause?

Reply With Quote