Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALLTRIM vs PADL with Indexes
Message
 
 
À
19/04/2001 11:30:58
David Brunelle
Université de Sherbrooke
Sherbrooke, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00497311
Message ID:
00497327
Vues:
11
This message has been marked as the solution to the initial question of the thread.
>Here is a typical situation. There is a table with record of 4 long but most of them only have two letter and are put that way in the table : " AA" (2 spaces before) There is an index XINDEX on that record as : XINDEX = UPPER(field)
>There is a form that seek the table for a specific match : "AA"
>
>Which one is faster...?
>Padding the "AA" with 2 spaces and then do the SEEK, or use SEEK (ALLTRIM(field))
>Will both be the same speed or will one of them use the index where the other will not?

They will both be the same speed and they will both use the index. By definition, SEEK always and only uses the index.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform