Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
REINDEX verses INDEX ON
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00158654
Message ID:
00158681
Views:
14
>Hi,
>
>I have a technical query:
>
>I have a database of 200,000 records that I have imported into a new (identical) structure with 36 indexes in the CDX.
>
>I would like to know if Foxpro will have problem with index tree balancing.
>
>If so will recreating the index correct this.
>
>The main question is should we re-create the indexes using INDEX ON from scratch OR REINDEX. The more detailed the better.

My opinion, doing a DELETE TAG ALL, followed by a series of INDEX ON... statements offers significant advantages over reindex.

REINDEX offers one advantage; a single command does the work of lots of individual lines of code. However, it does nothing to relieve index file bloat (.CDX files do not recover space well; if you're adding/deleting/altering index keys fairly frequently, the .CDX will grow beyond it's minimal required size), and if the .CDX file header gets damaged, REINDEX can't reconstruct it.

The more tedious approach of rebuilding in code solves both problems quite well.

You might consider using Stonefield Database Toolkit; it's a great utility that maintains the metadata for your databases, allows for easy extension of the database container, and provides a number of useful utility routines that can be integrated into your application. The dabase maintenance utility code makes it well worth the cost.

>
>Any ideas,
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform