pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Keith Gray <keith@heart.com.au>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Slow performance on MAX(primary_key)
Date: Tue, 15 Oct 2002 09:23:15 +0100
Message-ID: <200210150923.15822.dev@archonet.com> (raw)
In-Reply-To: <3DABC801.8060902@heart.com.au>
References: <20021015071628.57518.qmail@web80304.mail.yahoo.com>
	<3DABC801.8060902@heart.com.au>

On Tuesday 15 Oct 2002 8:47 am, Keith Gray wrote:
> Ludwig Lim wrote:
> >   As of now, Max() doesn't utilizes the indices hence
> > it always do a sequential scan.
>
> Thanks Ludwig,
>
> That does help performance, but I was using a "standard"
> SQL command wrapped in a VB6 ADO ODBC program.
>
> 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, and for certain aggregate functions (e.g. not sum()). This means that 
the parser would need special-case code to spot these cases, along with tags 
for those functions that can be optimised. Thinking further, it might also 
vary from type to type. Given that there is a simple workaround and the need 
for the optimisation to be added cleanly to the code I believe this has a 
fairly low priority.

There is a todo list on the developers' side of the website which has a list 
of changes in upcoming releases, you could check there for details.

-- 
  Richard Huxton



view thread (7+ messages)  latest in thread

Message-ID: <200210150923.15822.dev@archonet.com>
Permalink:  ../200210150923.15822.dev@archonet.com/
Also on:    postgresql.org/message-id/200210150923.15822.dev@archonet.com

 · 

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-sql@postgresql.org
  Cc: dev@archonet.com, keith@heart.com.au
  Subject: Re: Slow performance on MAX(primary_key)
  In-Reply-To: <200210150923.15822.dev@archonet.com>

* 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