Ioana Danes <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to