Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server slow with LIKE
Message
 
To
06/04/2008 16:39:03
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01308583
Message ID:
01308592
Views:
8
>Has anyone found a way to speed up SQL Server when using the LIKE operator with a % character? When doing it from the interface, this is as it is in VFP. But, when using it from our application, where everything is parameterized, this is slow. I have been answering some requests in the past weeks in regards to that where everyone is wondering why it is so slow when searching for field that starts with something. They got used to VFP where this is instant result. What can I do to speed that up?

Are you using Sql's text indexing features on the fields you're interested in? That will significantly speed up searches.

Using named parmeters vs. hardcoded values should make no difference. Maybe the slowness is in your returning the results (ie. returning a large data set to the client code) rather than the query execution.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform