Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the best index expression?
Message
 
 
To
18/04/2005 15:56:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01005870
Message ID:
01005970
Views:
23
SET ORDER TO or USE TABLE ORDER TAG myTag gives the worst performance regardless of SET('talk') setting. Strange, but true...

>>I'm thinking, could it be better to use filtered index instead.
>>
>>E.g. currently I do:
>>scan for m.plError=.f. and SearchTB = m.lcSearch and not empty(InsCommand)
>>
>>May be it would be faster to set a filtered index and do seek, when scan while?
>>
>>However, as I recall, I tried similar idea (in another context, though) and it actually slowed it down.
>>
>>>
INDEX ON EMPTY (MyField) TAG E_MyField
>>>SET FILTER TO NOT EMPTY (MyField)
HTH
>>>
>>>>If I want to filter all non-empty values for character (100) field, what would be the best expression for the index (if I need the index)?
>
>
>* define this index
>INDEX ON SearchTB TAG TAGOPTIM FOR NOT empty(InsCommand) && AND NOT DELETED()
>
>
>On Routine
>
>SET ORDER TO TAGOPTIM
>SEEK m.lcSearch
>scan WHILE SearchTB = m.lcSearch AND !m.plError
>...
>ENDSCAN
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform