Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index and SQL statement pattern related to speed
Message
 
To
30/05/2002 12:46:26
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00663070
Message ID:
00663088
Views:
19
Thanks That helps
Jon

>Your rule is essentially correct.
>
>You said your index is INDEX ON A+B TAG SOMETAG
>
>You SELECT commands won't use this tag as they stand. The SQL commands you wrote would benefit from indexes like these...
>
>INDEX ON A TAG ATAG
>INDEX ON B TAG BTAG
>
>In order to do an SQL command that uses the first index, you must...
>
>SELECT WHERE A+B = vp_A+vp_B.
>
>If you try ...
>
>SELECT WHERE B+A = vp_B+vp_A. This would be slow because it isn't using any of the indexes.
>
>>Example:
>>If my index on a table is A + B
>>(two chacter based fields to keep things simple) and I then have
>>
>>SELECT statement with WHERE B = vp_B AND A = vp_A
>>
>>will this run at the same speed as the same as
>>
>>SELECT statement but with WHERE A = vp_A AND B = vp_B
>>
>>Thanks
>>Jon
Previous
Reply
Map
View

Click here to load this message in the networking platform