Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rushmore optimization question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00214391
Message ID:
00214423
Views:
20
>>>If one has a primary index on a key field that sets a flag on !DELETED(), does one need a second index on the same expression w/o the filter for full Rushmore optimization?
>>>
>>
>>If you're using a FOR clause, definitely yes; I'm not certain about the situation where you have a character field and you do something to concatenate the result of an IIF(DELETED(),some char expn,some other char expn) as a part of the key.
>>
>>
>>>TIA
>
>Ed,
>
>You could use something like INDEX ON MyKey+IIF(DELETED(),'D',' '). This would work as long as your queries looked like WHERE MyKey+IIF(DELETED(),'D', ' ')=x. The left side has to be exactly like the index key. That even means that in this example using double quotes in your query won't work. Also, if ANSI is set on, you'd have to add a blank space to get it to work. Might be easier to have one index :).

It's not a problem I've ever had - I use a surrogate key as a primary IAC, and I don't recycle keys, so there's no need to filter the primary key for deletion status.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform