"Ian Harding" <ianh(at)tpchd(dot)org> writes:
> Another case of blockhead programmer. I must have been smoking something when I wrote that piece of junk. I collapsed it into a single query with sum(CASE WHEN DAYNUMBER = X THEN HOURS ELSE NULL) for the hours and it works like clockwork.
> Sorry about the noise.
I was wondering if you couldn't simplify it ;-) ... but the question of
why the plan got worse after VACUUM ANALYZE is still interesting. At
least to me.
regards, tom lane