Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: VFP7 SP1 REINDEX no longer removes BLOAT from .CDX
Message
 
 
To
07/05/2002 11:17:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00652071
Message ID:
00653576
Views:
16
Dragan,

The VFP B+Tree needs to store both the key value and a 4 byte record pointer to the actual record. So for the first index test I posted in the article, using just an integer key, VFP is compressing (4+4) * 10000 = 88000 bytes into 48128 bytes. The 88,000 bytes is a theoretical minimum and would require that every leaf node of the tree is 100% full. VFP7SP1 has lost some of the compression performance because it's splitting full nodes of the tree earlier.

The c(20) index should require (20+4) * 10000 = 240000, but VFP uses only 167936 bytes. Note that I specifically created those test values in a way to reduce their compressibility. VFP7SP1 is using 317952 bytes for the index, which is actually more than the theoretical min.

>I assume the calculus involved there, regarding the number of keys per node, is only approximate - AFAIK, ever since the appearance of .cdx indices, Fox was compressing them, physically storing only the difference between two consecutive values. Mmmm... it's been a long time since I last looked at the structure of a .cdx with a magnifying glass (i.e. hex viewer), could be it's time again.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform