Re: Getting row with id=max(id)

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Gerald Gutierrez <gml1(at)coldresist(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Getting row with id=max(id)
Date: 2001-06-07 19:51:38
Message-ID: Pine.BSO.4.10.10106071550070.5424-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 7 Jun 2001, Gerald Gutierrez wrote:

> Perhaps if the server internally rewrote the second query into the first,
> it would make the intuitive version much faster. The same can be done for
> min() and perhaps other functions as well.

Unfortunately, currently that's not possible, because of the design of
aggregate functions (they are pluggable, and the API for aggregate
functions has no support for understanding that an index may be used to
compute an aggregate). It'd be nice for a TODO item...:

-alex

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dennis 2001-06-07 21:43:18 Forein Key Problem
Previous Message Tom Ivar Helbekkmo 2001-06-07 19:42:32 Re: [HACKERS] Re: behavior of ' = NULL' vs. MySQL vs. Standards