From: Keith Gray <keith@heart.com.au>
To: Richard Huxton <dev@archonet.com>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Slow performance on MAX(primary_key)
Date: Thu, 17 Oct 2002 10:46:59 +1000
Message-ID: <3DAE0883.6090709@heart.com.au> (raw)
References: <20021015071628.57518.qmail@web80304.mail.yahoo.com>
<3DABC801.8060902@heart.com.au>
<200210150923.15822.dev@archonet.com>
Richard Huxton wrote:
>>> As of now, Max() doesn't utilizes the indices hence
>>>it always do a sequential scan.
>>Is this likely to be sorted in 7.2 ?
>>Is anyone looking at this?
> As I understand, the problem is that the optimisation only applies for simple
> cases...
Getting MIN() adn MAX() seems fairly trivial to me.
When is on an index or more importantly Primary
Key it must be a common SQL.
Would it be possible in the code to look at
the field in MIN() or MAX() and if it is
indexed use a similar method to the suggested
SQL work around?
Can I help this to happen?
--
Keith Gray
Technical Services Manager
Heart Consulting Services
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-sql@postgresql.org
Cc: keith@heart.com.au, dev@archonet.com
Subject: Re: Slow performance on MAX(primary_key)
In-Reply-To: <3DAE0883.6090709@heart.com.au>
* 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