Ioana Danes <ioanasoftware(at)yahoo(dot)ca> writes:
> Does anyone now what the problem is with the following select when upgrading to postgresql 8.1.4 the query plan does not use the indexes as in postgresql 8.0.3.
The planner doesn't have enough information about the correlation
between testtype and testid to guess that the index-driven max()
optimization doesn't work well in this case. But I see you've
already found the solution ...
regards, tom lane