Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What does Pack do?
Message
De
17/06/2014 07:04:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01601949
Message ID:
01601951
Vues:
56
>A customer has bloat on an fpt that is in near constant use. I've gone over the code to see where I might be adding in too much date, removed some fields etc. but still it run towards the 2Gb limit. I can pack the file at night time, generally after midnight but not my favourite thing to do.
>Can somone tell me what pack does please, I've read the online and help stuff but it doesn't make sense to what I see and my testing.
>Is there any way to reduce the size of the fpt while users are in the system?
>In a test area I have a dbf of 120mb and related ftp of 850Mb.
>If I use the select command from this file into a new dbf the fpt reduces to 50mb, this is the same is deleted is set on or off.
>If I use the copy to command from this file into a new dbf the fpt reduces to 50mb, this is the same is deleted is set on or off.
>I then tried to select into a cursor and loop through the original file replacing the 3 memo fields with the cursor version, using a variable. The FPT got bigger. I also tried replacing the memo field with a blank first but it still got bigger. I removed the variable element and did a direct replace from the cursor.memo1 to the file, again the file got bigger.
>Finally I used the file that I selected into where the fpt was reduced 50mb and did a replace into the original file. The FPT got bigger.
>~M

To reduce the size of a ftp, you must
Use Yourtable Exclusive
Pack Memo
The thing is that for a memo field, the record is not always reused. Instead a new record is created in the ftp, containing the new data, most of the times you change or remove the data, and the old data is not removed. In other words, the ftp may grow for every little change in a memo field.

You can read more about this memo field bloat here: http://fox.wikis.com/wc.dll?Fox~MemoBloat

And here's an article of how to reduce this problem: http://portal.dfpug.de/dfpug/Dokumente/FoxTalk/FoxTalk1996/FT19961_11.PDF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform