When I issue "pack memo" command for the table with
0.8G DBF, 0.8G CDX, 1G FPT, the process start the pack in a slower rate almost 1% per hrs, but i cannot have 100 hrs' time to pack the memo, so any suggestions on this issue?
If you are trying to do this over a network. I would try doing it locally, either write a small exe to pack the table and put it on your server, or copy the files to a box with VFP installed on it and pack it there. Other than that my only other suggestions are more hardware, more memory and a fater processor and harddrive.
What happens if you try 'PACK DBF'? If there are a lot of deleted records, this might help reduce the size of the table so that a subsequent 'PACK MEMO' might run in a reasonable time.
Cleanup & defrag the hard drive.
When you use PACK, Microsoft Visual FoxPro copies all records not marked for deletion to a temporary table. After PACK is finished executing, Visual FoxPro deletes the original table from disk and renames the temporary table with the original table name.
Create an index on delete records
I'm not sure if PACK uses Rushmore technology but it can't hurt.
INDEX ON DELETED() TAG del
Ed
Please let me know if the sugestion(s) I provide are helpful to you.
Sometimes your the windshield... Sometimes your the bug.
SELECT oldfile
COPY STRUCTURE TO newfile WITH CDX
USE newfile IN 0
SELECT oldfile
SET FILTER TO !DELETED()
SCAN
SCATTER MEMVAR MEMO
SELECT newfile
APPEND BLANK
GATHER MEMVAR MEMO
SELECT oldfile
ENDSCAN
CLOSE DATABASES
RETURN
Ed
Please let me know if the sugestion(s) I provide are helpful to you.
Sometimes your the windshield... Sometimes your the bug.
1. The method of adding index on deleted record doesn't work
2. The method of copying the one by one is not worth to do. It will still use most of RAM and CPU, and it last for as long as the prediction of "PACK MEMO" -- 4 days (at least)
What I now do is to
1. set delete on
Select * from orginal_table into table new_table
2. Rebuild the index file .CDX
3. Replace the orginal_table by new_table
It can perform in about 45 mins to do. But what I worry now, it is the destroy of recno()/order of original tale.
Will it happen? sohrab100
Packing a table rewrites the recno() of each record. Especilly if there are deleted records that are being removed. You should NOT use recno() for access to data records.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.