- Article Type: General
- Product: Aleph
- Product Version: 20, 21, 22, 23
I was wondering if you have any recommendations with regard to the various history tables in Aleph. Should there ever be a purge or removal of older data in tables such as z30H, z36h, z37h, z35, etc? What do other sites usually do in regard to these tables?
I'm looking ahead to our Aleph 20 upgrade, and if it is normal to archive off some of this or other older data, I'd like to begin exploring that.
The z35 is used for batch circulation statistics (the cir-30 and cir-31 services); as described in Article 000036070 ("SQL to locate items with fewer (or more) than x loans") (link below) it might also be used to locate items for weeding. The z36h displays the loan history for a particular patron or item; the z37h, the request history; the z30h, the history of item updates.
The only reason to purge the z35, z37h, and z30h data would be space considerations. In the case of the z36h, an additional consideration is slowness in checking out the item (Article 000044836 -- "Slow check-out of items which have been loaned many times" -- link below) and in displaying the item list (Article 000033261 -- " Slow display of GUI Items List when there are many items with many loans" -- Link below).
If you run the patron scrubbing routines, the closed z31 cash records are pretty much useless after being scrubbed. And the z36h, z37h, and z309 circ logger records are of limited use. (They can no longer be used to display information on the patron's loan/request history, but can be used for the item's loan/request history.) cir-78 can be used to physically delete z309 circ logger records.
There could be an advantage to saving the z35 despite the scrubbing of the patron ID from it, since the circ statistics produced from it do not require or involve the patron ID. Also, as described in Article 000036070 ("SQL to locate items with fewer (or more) than x loans"), it might be used to produce a weeding report. Also, the z35 is smaller than the z36h and the z309.
The item history could continue to have value even after several years. (If you want to reduce its size you might want to delete z30h records older than x years where the z30h_h_reason is "All fields". See Article 000043431 ("Unnecessary z30h history records") (link below) in this regard.
In version 22.1, util x/13 ("Clean Events and Historic Information tables") has been added so the deletion of the z30h, z36h, etc., can be done through the util menu -- though it won't allow you to limit the deletion to just "All fields" z30h records -- that would need to be done via SQL.
You could use the Z30H_H_DATE for locating records to delete. It would be better to use this in combination with the Z30H_H_REASON (--preserving records of item deletion, for instance).
(The "Other" history records generally relate to less important changes --those not covered by an explicit ./xxx50/tab/tab_item_history type -- but may comprise 2/3 or more of the table.).
You should back up the z30h with p_file_03 before running this.
Article link: SQL to locate items with fewer (or more) than x loans
Article link: Slow check-out of items which have been loaned many times
Article link: Slow display of GUI Items List when there are many items with many loans
Article link: Unnecessary z30h history records
- Article last edited: 25-Mar-2016