How do I make a SQL Wildcard search run faster?

I'm doing an OnKeyUp search that looks like this:

SELECT (8 Rows from all three tables) FROM ORDERS o JOIN CLIENTS c ON c.ClientId = o.ClientId JOIN VENDORS v on v.VendorId = o.VendorId WHERE o.ClientName like '%txtCriteria.Text%' OR o.AttentionTo like '%txtCriteria.Text%'

How can I speed up this search?

Indexes?  Filtering in C#?

Thanks,

ASP.NET 3.5, SQL2008, VS2008
LukeJDAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
in short: you cannot....
unless you use full-text indexing (and query syntax) instead of the LIKE ... % syntax
you might consider giving the use the "full-text" search: fast, but eventually not 100% accurate, and a "slow", but "accurate" mode using the LIKE
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chapmandewCommented:
you can IF you are able to remove the initial %...like this:

SELECT (8 Rows from all three tables) FROM ORDERS o JOIN CLIENTS c ON c.ClientId = o.ClientId JOIN VENDORS v on v.VendorId = o.VendorId WHERE o.ClientName like 'txtCriteria.Text%' OR o.AttentionTo like 'txtCriteria.Text%'
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.