Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server slow with LIKE
Message
De
06/04/2008 17:28:40
 
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:
01308593
Vues:
7
>Are you using Sql's text indexing features on the fields you're interested in? That will significantly speed up searches.

So, basically, wherever I plan to use LIKE with %, I should do a special setting to avoid that situation. Can you confirm me that in VFP this is something we didn't have to do. But, in SQL Server, doing the same, would require some additional setting as its algorythms of indexation is somewhat different than VFP and we might be better to make some adjustments in the text indexing, such as you just described.

As for the text indexing, I just want to make sure we are talking about the same thing here. I am not in need of fuzzy indexing such as searching for a specific string in a field no matter where the string is. I am only in need of what we have in VFP by obtaining immediate search result when I need to search for a field value starting with something. So, based on that, do I still really need to do some text indexing? If yes, where should I do for that?

>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.

We tested that the other week directly from the interface. The same SQL, when we use LIKE with % will take much longer, in most cases, based on specific algorythms being used, when being parameterized.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform