Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to speed up a Select Query
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00424231
Message ID:
00424423
Views:
19
Guys, with LIKE operator indexes NEVER used, so setting index order only can slow down query. If you want to use indexes, use something other than LIKE, for example, following expression lists all that starting by certain string:
cName>='Tom' AND cName < 'Tomzz'
Will show
Tomas
Tomundi
Tomasso
etc.



>>Do you have an index for the field that you are looking for?
>
>Yes I have an index for this field, but another litle question ?
>
>I'm using select * from dbc!dbf wher "LIKE" "%nametofind"
>
>Did I have to open the table and set this to the field order before I run the query expression for speed up my query ? or
>
>How could I Specify to my select sentence to use the index for the field ?
>
>Thanks for your answer
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform