Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is index used
Message
De
18/09/2002 03:43:13
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/09/2002 03:29:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00701640
Message ID:
00701644
Vues:
15
>If I have an index on field rfrom C(10)
>index on rfrom tag rfrom
>
>In case of select statement
>
>set exact off
>lvalue='0104'
>
>select * from ranges where alltrim(rfrom)=lvalue
>
>is index used or it is a full scan.
>
>My goal is to learn whether there is anything in a table with the field value for rfrom for which the statement
>atc( alltrim(rfrom) , lvalue ) = 1
>is true
>
>If it is a full scan any suggestions how to organize an index which could be used in the case like this.
>
>Thank you
>Michael

Michael,
Set exact doesn't have an affect on SQL comparison (set ansi does).

select * from ranges where rfrom=lvalue

would return all those starting with lvalue. If you needed it to be exactly lvalue then :

select * from ranges where rfrom == lvalue

PS: It'd be a full scan with alltrim.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform