Forum OpenACS Q&A: Re: OpenACS.org upgrade (was: Openacs.org having problems. Refrain from using it until Sept 25th)

1. Get rid of the "acs_users_all assignee" in the first subquery, it's not used in the subquery.  The query probably got hacked because the assignee was being figured out wrong or needed to join against the second subquery, but when moved didn't get deleted from the first subquery.  Regardless you'll see that materializing that subquery takes 10 seconds and it is done a twelve times.  Malte saw a 1/3 improvement on a 25 second bug-tracker query by removing this (I was helping him on irc).

2. What Jade said, especially the second subquery where only first/last names is needed.  Break the view abstraction and join against persons on person_id.

After verifying that the new query returns the right results, post the new times and plan and we'll work from there ...

This did the trick to a degree where the site is accessible. Will commit the code change as this affects all bug tracker instances on postgres. Now we need to see how we can tune this further to work faster than on the old site... :).