Forum OpenACS Q&A: Re: Problem with acs-subsite query "permissions" (need help)

Hmmm...the updated plan is estimated to run FASTER than before, but the actual execution time is horrible.

Is this on the same machine, Nima? Both plans look good. I don't see why they would be different because the CVS LOG shows no changes to the query. Can you do a hand-inspection of the query on your 2.0.6 instance and your 2.1 instance to see if there's actually a difference?

My guess is that it's going to disk in the second case. Can you use TIME (put the query in a file and do a "time psql dbname -f the_file_with_the_query) to see how much CPU time vs. disk time is being used in this query?

My comments above still stand at least in regard to the acs_perm call in the WHERE clause ...