pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Luke Lonergan <LLonergan@greenplum.com>
Cc: Adam Rich <adam.r@sbcglobal.net>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Craig A. James <cjames@modgraph-usa.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: max() versus order/limit (WAS: High update
Date: Mon, 15 Jan 2007 07:38:09 -0300
Message-ID: <20070115103809.GI7233@alvh.no-ip.org> (raw)
In-Reply-To: <C3E62232E3BCF24CBA20D72BFDCB6BF8017437CE@MI8NYCMAIL08.Mi8.com>
References: <C3E62232E3BCF24CBA20D72BFDCB6BF8017437CE@MI8NYCMAIL08.Mi8.com>

Luke Lonergan wrote:
> Adam,
> 
> This optimization would require teaching the planner to use an index for
> MAX/MIN when available.  It seems like an OK thing to do to me.

This optimization already exists, albeit for queries that use a single
table.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (3+ messages)  latest in thread

Message-ID: <20070115103809.GI7233@alvh.no-ip.org>
Permalink:  ../20070115103809.GI7233@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20070115103809.GI7233@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, LLonergan@greenplum.com, adam.r@sbcglobal.net, jd@commandprompt.com, tgl@sss.pgh.pa.us, cjames@modgraph-usa.com
  Subject: Re: max() versus order/limit (WAS: High update
  In-Reply-To: <20070115103809.GI7233@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox