Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
>Walter-
>
>>Ehhh, I'm afraid I can't follow that. Why should I need an INDEX on deleted() if I filter my PKs on DELETED() ?
>
>Er, actually the PK index filter is on !deleted() right?
ehh, yes.
>And the deleted() tag is useful when you have SET DELETED ON. Sometimes. *sigh*
You're right. In the following circumstance it might help (of course when SET DELETE = ON):
- If you want to fully optimize the COUNT() command.
- If you have significant amounts of deleted() records in the table, it might speed up queries returning large portions of the table, however queries that return only smal portions of the table and can be optimized enough by a more discriminating (selective) key (like a PK) may suffer from the deleted() tag.
- You want to use the feature that VFP creates filters if a SQL-select command is fully optimizable. However, this feature seems not to have much applications. Not seldom are people bitten by this feature as they are not able to index a cursor returned from the SQL - SELECT command.
Since these applications are fairly rare, I think the general rule should be, DON'T use an index tag on DELETED(), unless you've got very, very good reason to and accept the performance penalties that come with the use of it.
Sidenote: If you use the DELETED() tag to search for deleted records to recycle them, you might be better of to use an INDEX ON .t. FOR DELETED() TAG delrec and a SEEK(.t.,"yourtable","DelRec")
Walter,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only