Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Are there benefits to Index on Deleted()?
Message
 
To
15/03/2002 21:35:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00633629
Message ID:
00633731
Views:
23
Jim,

I have used Set Deleted On for years for reason you stated and others. I have not noticed any performance problem. However after reading the article talking about using an index tag based on Deleted() I began to wonder if I might see increased performance using such a tag. However, I have not noticed any significant change. So I was interested to hear from others on the subject.

Thanks
Simon

>Simon,
>
>SET DELETED ON has other uses though.
>You wouldn't want SQL Select returning records flagged as deleted (in the source table) as UNDELETED in the returned cursor, would you? Yet that's what it would do when DELETED is OFF and deleted records qualify.
>
>Also, the documentation lies (at least in my opinion) when it says that with deleted set ON, only live records (as opposed to deleted ones too) are returned EXCEPT IF THE SCoPE OF THE COMMAND IS A SINGLE RECORD. I ceretainly consider SEEK to "scope to a single record" yet SEEK will not return a deleted record when DELETED is ON!
>cheers
>
>
>
>>Hi Mike
>>
>>I understand what you are telling me. I just wondered about the benefits relating to Set Deleted On. I have not noticed an particular performance gain with Set Deleted On and an Index Tag based on Deleted().
>>
>>Simon
>>
>>>Hi Simon
>>>
>>>This leads to full Rushmore Optimization which can be a problem. Specifcally, if there's only one deleted record in your entire table and your query pulls records except the deleted one, what's the point trying to optimize that? Queries can run faster on local drives with the tag, which can be misleading.
>>>
>>>What you need to shoot for is Proper Rushmore Optimization (that's what the PRO in Foxpro stands for <g>). There are lots of articles around and I'm sure someone will chime in with them. In order to let VFP tell you if a query is fully optimized you either need the tag or set deleted off while you build/test your view/sql. You can then remove the tag and set deleted back on, knowing the view is optimized even though VFP will say you don't have full optimization.
>>>
>>>
>>>>Hi
>>>>
>>>>I read an article by a UT member that stated using an index built on the Deleted() function would allow Rushmore optimization on tables when using Set Deleted On. I use Set Deleted On all the time but I have not noticed any speed increase by adding an index tag to my tables based on Deleted().
>>>>
>>>>I can understand that a command like
>>>>
>>>>
>>>>Select * For Deleted()
>>>>
>>>>
>>>>would benefit from a Deleted() index tag but wondered if the use of a Deleted() tag gave enough benefit to outweigh the cost of an additional index tag.
>>>>
>>>>Thanks
>>>>Simon White
Simon White
dCipher Computing
Previous
Reply
Map
View

Click here to load this message in the networking platform