On Thu, Nov 11, 2004 at 17:52:19 +1100,
  John Hansen <[EMAIL PROTECTED]> wrote:
> Why not just change the function all together to 'select $1 from $2
> order by $1 desc limit 1;'
> 
> Is there ANY situation where max(col) as it is, would be faster?

Yes. A couple I can think of are:
When count(col) is also being used.
When a GROUP BY is being used and there isn't an index that can both be used
to do the grouping and col order within each group.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to