Forum OpenACS Development: Re: Limitation on length of bind variables

Collapse
Posted by Don Baccus on
There's already a table which contains the information which you might want to try joining against: portal_element_parameters.

This has an index on (element_id, key) so assuming new-portal is passing you the element_id as part of the config array (if not I'll make sure the rewrite does!), you can essentially say  "package_id in (select package_id from portal_element_parameters where element_id = :my_element_id and key = 'package_id")" if the join-list is a list of package ids.

This ought to be faster than the "in (long list of constants)" and of course faster than creating a temp table filled with essentially the same information.