Re: Index and Begin With search
From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/25/04
- Next message: Rich: "function to compare/join tables on dates +- n?"
- Previous message: Dariusz Hoszowski: "OSQL and collation"
- In reply to: A.M: "Re: Index and Begin With search"
- Next in thread: Adam Machanic: "Re: Index and Begin With search"
- Reply: Adam Machanic: "Re: Index and Begin With search"
- Reply: A.M: "Re: Index and Begin With search"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 14:49:50 -0400
Why would you want to assume anything? TEST IT.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/ "A.M" <nospam1@online.nospam> wrote in message news:uwwr2ioQEHA.3528@TK2MSFTNGP09.phx.gbl... > Thank you for reply, > > Can I assume that LIKE is always faster than LEFT in where clause ? > > Thanks, > Alan > > > > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message > news:us$J1GoQEHA.252@TK2MSFTNGP10.phx.gbl... > > LIKE 'ala%' will at least consider the index, whereas computations like > LEFT > > or SUBSTRING will not. > > > > -- > > Aaron Bertrand > > SQL Server MVP > > http://www.aspfaq.com/ > > > > > > > > > > "A.M" <nospam1@online.nospam> wrote in message > > news:ONLz9$nQEHA.1048@tk2msftngp13.phx.gbl... > > > Hi, > > > > > > I have an index based on column "Name" called IDX_Name. > > > > > > I know that if I have a query to search for specific column, IDX_Name > will > > > be used. > > > > > > Now I want to search for Names that begin with sepcific letters. If I > use > > a > > > query like: > > > > > > Select * from tblCustomer where Left(Name ,3) = 'ala' > > > > > > Then query processor won't utilise IDX_Name. > > > > > > How can I use index with "Begin With " kind of searchs? > > > > > > Thanks, > > > Alan, > > > > > > > > > > > > > > >
- Next message: Rich: "function to compare/join tables on dates +- n?"
- Previous message: Dariusz Hoszowski: "OSQL and collation"
- In reply to: A.M: "Re: Index and Begin With search"
- Next in thread: Adam Machanic: "Re: Index and Begin With search"
- Reply: Adam Machanic: "Re: Index and Begin With search"
- Reply: A.M: "Re: Index and Begin With search"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|