[OPEN-ILS-DEV] Reshelving Complete

Bill Ott bott at grpl.org
Wed Sep 23 12:36:43 EDT 2009


Continuing to look for our anomalous reshelving times...

Should the "AND circ.id IS NULL", in the second portion of the query, be 
part of the WHERE instead?  Isolating and running only this portion, the 
JOIN seems to add a null circ row to every item.


            SELECT  cp.id
                           FROM $cp cp
                    LEFT JOIN $setting setting
                        ON (cp.circ_lib = setting.org_unit AND 
setting.name = 'circ.reshelving_complete.interval')
                    LEFT JOIN $circ circ ON (circ.target_copy = cp.id 
AND circ.id IS NULL)
              WHERE cp.status = 7
                    AND cp.create_date < NOW() - CAST( COALESCE( BTRIM( 
setting.value,'"' ), ? )  AS INTERVAL)



More information about the Open-ils-dev mailing list