Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Contents of SQL cursor are dissapearing.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00210779
Message ID:
00211098
Views:
45
>>I understand this logic. However, I still believe that personally I should have DELETED() tag. Firstly, there are many situations when non-filtered option is good enough, e.g. for ad-hoc queries or reports. Usually, the necessity for non-filtered recordset arises from interface needs, the most popular case is few child records in grid. Here, DELETED() tag consideration is the last straw that convinces me that my preference for SEEK/INSERT cursor against view is more than justifiable.
>
>I find the SEEK/INSERT method very fast and applicable to many situations, also.
>
>As to Deleted(), as I say, it all depends on your needs, and also whether you expect many deleted records. But the article has some statistics to back it up that are interesting...in one case, a large table SQL was 30 times faster (or so) without deleted index, enough to make the application either worthless or usable to the developer...and enough so that anyone with performance problems with SQL view, table, or non-filtered cursor result sets should take a look first at deleted index, or any other field indexes which are highly unbalanced...

Yes, it's complex issue. My feeling is that if resulting recordset is large than record-by-record check for deleted() flag (if there is no index) would be slow; and if recordset is small (i guess here the difference is) then I use SEEK/INSERT. Also, it's all about one-table query, and many situations are for multi-tables.
I have one more 'generic' consideration. I believe, you're familiar with pretty common practice- never delete records (interactively at least). Instead of this, each record may carry some Character,1 field for fancy flag, e.g. 'D'-deleted, 'N'-new, 'C'-changed and so on. Personally, I never used this way, but many people around do. So, let say we have this flag and the next question is: would it be reasonable to have index tag in this field? It seems as quite reasonable. So, if it's reasonable to have tag on some makeshift flag, then the same can be applied to deleted(), which is actually the same flag, only ready-to-use.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform