Shrinking AP_CheckHistoryHeader.M4T, M4T.001, M4T.002

SOLVED

Sage 100 2022.1 Advanced

I have a customer whose AP_CheckHistoryHeader file has grown to be very large.

I suspect it may have to do with a large number of void checks being created during their process of writing checks. They manually swap between very high-number checks and low-number checks.

I purged history - keeping only the last ten years

I purged voided checks for one bank code

I purged AP History through the utilities and removed voice checks

Yet the AP Check History Header seems to stay the same size - 4 files ( 3 segmented with .00x) of about 1.8 GB each. For reference AP_CheckHistoryDetail.M4T is about 29 MB (one file).

My question: Why doesn't AP_CheckHistory'Header shrink and is there an extra step I've missed? 

  • 0

    Before I purged the Voids, I showed 10 million records in AP Check History Header; after the purge, I showed about 2 million. Yet the file size hasn't shrunk.

  • +1
    verified answer

    This has to do with the internal structure of the ProvideX files. Just deleting records does not always shrink the files.  To do so, you can run Rebuild Key Files with the Optimize File option selected.  Be sure to make a backup of all the files (.M4T, .001, .002, etc.) before running the rebuild. 

    Below is the help information on Optimize File in Rebuild Key Files:

    Select this check box to rewrite the file to a new file, remove excess empty data blocks, and arrange the primary keys in alpha-numeric order. A text file is launched in Notepad providing information about the file optimization. Clear this check box if you do not want to optimize the file.

    Thanks,

    Kent