Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help Improving Select Speed
Message
From
08/12/2000 21:22:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00450195
Message ID:
00451081
Views:
30
>I've actually seen this:
>
>Assuming the "myfield" field is C(5)
>
>index on myfield tag myfield1
>index on substr(myfield,2) tag myfield2
>index on substr(myfield,3) tag myfield3
>index on substr(myfield,4) tag myfield4
>index on substr(myfield,5) tag myfield5
>
>select * from mytable where:
> myfield=SearchMe or;
> substr(myfield,2)=SearchMe or;
> substr(myfield,3)=SearchMe or;
> substr(myfield,4)=SearchMe or;
> substr(myfield,5)=SearchMe
>
>With descent results. It's clunky and inserts into the table will be slower because of all of the index updating, but... It works.

Just wondering, did you try having just one index on MyField, and using the LIKE relation, as in

select * from mytable where ;
myfield=searchme or myfield like "%"+searchme

Theoretically, this should be faster (and easier to maintain) than having five conditions and having VFP load five tags.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform