Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk Space for Re-Index/Pack

Status
Not open for further replies.

Goofus828

Programmer
Nov 9, 2005
127
US
Hi again,
I either read someplace or was told that FoxPro needs 3 times the diskspace when performing a Re-index and/Or a pack.

I have a client with a 1.5 gig dbf with close to 4 million records but a couple thousand are corrupt. the client only has 3 gig free. And I'm cautious about packing/reindexing this file

thanks.
PS Yes I could ask them to free up more space but that is another issue.
 
You read right. It can use as much as three times the space to reindex files. PACKing will take twice the space because when you PACK a table - for example - MYTABLE.DBF, Fox basically does a COPY TO MYTABLE.BAK FOR !DELETED(), then deletes MYTABLE.DBF and renames MYTABLE.BAK to MYTABLE.DBF.
Keep in mind though, that if there are associated indexes, those automatically get recreated after the PACK.

So you have a couple choices. One is to delete the index file(s), do the PACK, and recreate the indexes from scratch.
Doing the PACK first may free up enough drive space.

Another option is to use a different drive for the temp/swap files while reindexing.
Of course using a different drive will be slower, but it beats running out of space in the middle of the process.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top