From: Jason Boyer Date: Tue, 5 Jun 2018 17:57:35 +0000 (-0400) Subject: LP1768022: Speed up ahopl X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0a803374cd554b3624a4cddfdbfc661bde914def;p=working%2FEvergreen.git LP1768022: Speed up ahopl In some cases the ahr.usr=ausp.usr join was causing planning times to be many times the actual execution times for this query. Changing to au.id=ausp.usr has the same effect but vastly faster planning times. Signed-off-by: Jason Boyer --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index b272b9ffab..d124ab7768 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -6163,7 +6163,7 @@ SELECT usr, FROM asset.copy_location ) acpl_ordered ON (acpl_ordered.id = acp.location) LEFT JOIN actor.usr_standing_penalty ausp - ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW())) + ON (au.id = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW())) LEFT JOIN config.standing_penalty csp ON ( csp.id = ausp.standing_penalty AND