Received: from spider.pilosoft.com (p55-222.acedsl.com [160.79.55.222]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f57JgOE77738 for ; Thu, 7 Jun 2001 15:42:25 -0400 (EDT) (envelope-from alex@pilosoft.com) Received: from localhost (alexmail@localhost) by spider.pilosoft.com (8.9.3/8.9.3) with ESMTP id PAA02415; Thu, 7 Jun 2001 15:51:38 -0400 (EDT) Date: Thu, 7 Jun 2001 15:51:38 -0400 (EDT) From: Alex Pilosov To: Gerald Gutierrez cc: pgsql-sql@postgresql.org Subject: Re: Getting row with id=max(id) In-Reply-To: <5.1.0.14.0.20010607120835.02bbbd60@coldresist.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200106/116 X-Sequence-Number: 3336 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