Re: MAX/MIN optimization via rewrite (plus query rewrites generally)

From: "John Hansen" <john(at)geeknet(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Alvaro Herrera" <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: "Mark Kirkwood" <markir(at)coretech(dot)co(dot)nz>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MAX/MIN optimization via rewrite (plus query rewrites generally)
Date: 2004-11-11 06:52:19
Message-ID: 5066E5A966339E42AA04BA10BA706AE56203@rodrick.geeknet.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

... John

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2004-11-11 07:18:05 Re: MAX/MIN optimization via rewrite (plus query rewrites
Previous Message Alexander Antonakakis 2004-11-11 06:20:11 Big Database