Skip to main content
ExLibris
  • Subscribe by RSS
  • ExLibris Dev

    cir-16 job is slow

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Problem Symptoms:
    The cir-16 (Report of Returned "Lost" and "Claimed Returned" Items) is slow -- taking more than 10 minutes for each million loan history records.

    Cause:
    Too many loan history records. The cir-16 job reads the z36h (Loan history) looking for returned items which had a z36_status of "L" (Lost) or "C" (Claims returned). It then reads the z30 item record for these items to get additional information. Thus, the key to improving the run time of cir-16 is reducing the number of z36h records (or improving their reading).

    As described in Article 000040356 ("Best practices - retention of item/circ history tables") (link below), z36h records which have had the patron ID scrubbed (see example below) have limited use. {Though they can still be used to produce the "[Loan] History" display under the "Item" tab in GUI Circulation, they will no longer be included in the "Circulation Summary" display under the Patron tab in GUI Circ (as they are no longer connected to the patron). (Note that the z30_no_loans counter always gives the actual total number of loans of the item.)}

    Resolution:
    Use SQL to delete any scrubbed z36h records (those with Z36H_ID like 'SCR%') more than a year old. (Note: in version 22.1, util x/13 ("Clean Events and Historic Information tables") has been added so this can be done through the util menu -- though it won't allow you to limit the deletion to just scrubbed z36h records....)

    Additional Information


    Article link:  Best practices - retention of item/circ history tables .

    The following SQLs show that there are 3,620,267 z36h records, 3,616,961 (99%) of which have had the patron ID scrubbed from them:

    xxx50@ALEPH20> select count(*) from z36h;
    **** Hit return to continue ****

    COUNT(*)
    ----------
    3620267

    xxx50@ALEPH20> select count(*) from z36h where Z36H_ID like 'SCR%';
    **** Hit return to continue ****

    COUNT(*)
    ----------
    3616961

    Category: Circulation


    • Article last edited: 10/23/2014
    //doorbell.io feedback widged