Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it reasonable to have index on DELETED()?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00196021
Message ID:
00198458
Views:
23
>>Hello Andrus,
>> If you have a large table and you SET DELETED ON, then you need the index on DELETED() regardless of how many records are deleted. If you do not have an index on DELETED(), VFP has to inspect each record to determine whether or not to present it. Thus, you lose all Rushmore optimization.
>
>In a partial defense of Andrus, I've run test cases where Partial Opt. ran faster than Full Opt., particularly when you have an index on Deleted and there are no deleted records, and tables are not great in size. "Full" is a theoretical label, and not necessarily always true in practice...
>
>But to critique Andrus, try randomly deleting about 1/2 the records, and then test with and without index on Deleted, see what kind of results you get, especially with larger tables...you should find a time curve increasingly in favor of the index on Deleted as size grows (and # deleted records)...so if there's any possibility a table will ever grow "large," the index is usually a good idea...


And be SURE you have SET DELETED ON, because if it is NOT set ON then the deleted() index is of no use whatsoever. It's only when SET DELETED is ON that the speed is affected.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform