Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No (more?) bloat with REINDEX command
Message
From
25/06/2001 13:39:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
No (more?) bloat with REINDEX command
Miscellaneous
Thread ID:
00523073
Message ID:
00523073
Views:
105
Hi all,

I post this mainly because it appears that many people believe that use of the REINDEX command causes CDX "bloat".

I know that I have always believed so until Evan D. noticed that SP3 seemd to have a much faster REINDEX and such was confirmed by MS. At that time I wondered if that might have affected the known bloat effect, reasoning that doing all indexes in 1 pass means that all of the TAGS would be in storage at the same time and so the process might then be able to overwrite the CDX from its beginning.

I finally tried this out yesterday and, sure enough, there was absolutely NO CDX BLOAT even after 5 REINDEX commands (closing the subject table each time in between).

Knowing no better I attribute this to SP3.

. . .but is that really the source of this observation. . .

The only other FoxPro that I have on a machine is a FPD 2.6 (probably 2.6b). I made an adjustment to change 2 of the indexes from type I to type N and repeated the test there.

To my great surprise there was NO CDX BLOAT there either!!!

Personally, I find this to be real puzzling. As puzzling, in fact, as the "fact" that the TAG on DELETED() is now known to be detrimental in most circumstances AND was "proven" to be similar in effect in FPD and FPW (per the article in FPA some time back.

Regardless, there are two primary reasons always stated as reasons to avoid the REINDEX command in favour of DELETE TAG ALL and recreate indexes:

1) CDX bloat caused by REINDEX;
2) REINDEX cannot work when the header is corrupted.

It is undeniable that there is a requirement to always have all of the INDEX ON statements available in case a corrupted header necessitates full reconstruction of the CDX.

BUT using the "DELETE TAG ALL and recreate indexes" technique as the STANDARD way to maintain indexes should definitely be re-evaluated, for two major reasons:

1) There is no CDX bloat with REINDEX, so there is no penalty;
2) REINDEX is much much faster since all indexes are rebuilt in a single pass where the other technique definitely causes multiple reads of the DBF.

I believe that my simple test was adequate but stand ready to hear differently.

I also would like to hear some reasoning as to why the FPD test would show similar results to the VFP test. I can say that the system with FPD on it does also have VFP with SP4 on it and do wonder if there might be some way that components of VFP could be used by FPD in such circumstances.

JimN
Next
Reply
Map
View

Click here to load this message in the networking platform