From 0a803374cd554b3624a4cddfdbfc661bde914def Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Tue, 5 Jun 2018 13:57:35 -0400 Subject: [PATCH] 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 --- Open-ILS/examples/fm_IDL.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.11.0