Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server speed (again, *sigh*)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00254302
Message ID:
00254491
Vues:
22
Hi, Mark (hot enough for 'ya here in Dallas?)

I get equally slow performance if I include any field other than LName along with LName.
Mark


>>SELECT ID FROM MyTable WHERE LName LIKE 'SM%'
>>
>>This returns about 12,000 records in 45 seconds.
>>
>>If I run this T-SQL statement:
>>
>>SELECT LName FROM MyTable WHERE LName LIKE 'SM%'
>>
>>This returns about 12,000 records in only 2 seconds! Very big difference.
>>
>
>The server is having to do a full table scan of all the IDs while comparing the LNAME parameter. In the second one only the index is being used. What do you get if you try:
>
>SELECT LName, ID from MyTable where LName LIKE 'SM%'
>
>and
>
>SELECT ID, LName from MyTable where LName LIKE 'SM%'
"It hit an iceberg and it sank. Get over it."
Robert Ballard, dicoverer of the Titanic wreckage.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform