Manual: v8 p140, v7 p136, v6 p130, v5 p216
[Important - the procedure below only works for 'ordinary' catalogues and cannot be used with SQL Connect created SQL Catalogues. To clean/compact this type of Catalogue consult the SQL-Server, Oracle or MySQL documentation.]
If you delete a lot of records from a Catalogue you may notice that you do not necessarily get a commensurate reduction in the size of the FDB file. If I create a new blank Catalogue is about 32 kb. Using a script to test add a 100 blank placeholders records, then deleting the added records and re-running the script several times, I ended up with an empty database of 1.3 Mb - proof that Portfolio doesn't always clean up too well. If you are regularly deleting records or after a single major deletion you might therefore wish to compact your Catalogue.
Well, there isn't a formal or described compacting feature. However, you can use the Recover method (see manual page refs above) on your catalogue and may notice a better file size reduction. You should definitely back up your Catalogue file before attempting this procedure in case not all records are properly recovered during the process.
Tip: so that your Catalogue retains its name at the end of the process, do this:
For the compacting to occur you must follow this (recovery) procedure:
If you don't see the "Recover Catalog" series of dialogs you may not get the result you expected. Note that in tests these dialogs are seen even when compacting/recovering a new totally empty Catalogue by the above method.
If successful, you should find the new catalogue file is smaller. By how much depends primarily on the number of previously deleted records.
Warning for v5 scripters!
There is an acknowledged v5 bug - fixed in v6 - that affects RIDs when the recovery process is used. Although it appears not to affect the general operation of the Catalogue, the process does affect the use of RIDs (support state the bug is not due to be fixed before v6). New items added to a Catalogue after recovery will have very high numbered RIDs, e.g. 3960406018 where the last 'old' RID was 3500. This RID number is used in any Disk Preview name e.g. that record would create p3960406018.jpg. The problem comes when you read the RID value via a script as the value returned is -334561278, a minus value and also different to the RID used in the disk preview name. So, the common technique of scripting a Preview name from the %RID% value will break in this case. Be careful!
Question: How do I compact a Catalogue? (Recovering Catalogues) [FAQ00106.htm]
Last Update:- 24 September 2007
Site and articles © Mark Anderson 2001-2007 - Visit my home page