The stored procedure is called from only one place, OpenILS::Application::AppUtils->ou_ancestor_setting_batch_insecure(), so one solution would be to have that caller split up invocations of the stored procedure. It would be a good idea to measure execution time to compare that approach with marshaling the list of OU names into a single string to pass to the stored procedure.
The stored procedure is called from only one place, OpenILS: :Application: :AppUtils- >ou_ancestor_ setting_ batch_insecure( ), so one solution would be to have that caller split up invocations of the stored procedure. It would be a good idea to measure execution time to compare that approach with marshaling the list of OU names into a single string to pass to the stored procedure.