Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT's and INDEXES
Message
From
16/08/2001 12:14:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
16/08/2001 04:33:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00544565
Message ID:
00544776
Views:
25
>Hi
>
>Do SQL-Selects create a temporary index on a field if the field you are checking is not indexed?
>
>If not, is it better to create an IDX before doing a Select to speed it up?
>
>Thanks
>Kev

Having an index on a field that participates in an expression will ensure that VFP uses ist. This may either speed things up, or, in some cases, make the querry much slower. I recently posted an entry in FAQ about Rushmore Optimization, and I suggest you read it. In summary, full R.O. is not always optimal. The basic criterion is: how many records fulfill each part of a condition (combined with AND, especially)? If the answer is "many", the index may actually slow the query down.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform