"Carson, Leonard" <lcarson(at)sdsc(dot)edu> writes:
> Here are the 3 views and some timing notes:
> http://pgsql.privatepaste.com/decae31693#
That doesn't really leave us any wiser than before, unfortunately.
It's clear that the root of the problem is the drastic underestimation of
the size of the rq/a join, but it's not clear why that's happening, nor
why 8.4 would not have fallen into the same trap.
Would it be possible to provide the data in the join columns involved in
that part of the query? To wit
requests.account_id
requests.start_date
allocations.account_id
allocations.initial_start_date
allocations.resource_id
regards, tom lane