Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server slow with LIKE
Message
 
À
06/04/2008 16:39:03
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01308583
Message ID:
01308592
Vues:
7
>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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform