Re: *sigh*

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: *sigh*
Date: 2003-10-19 07:27:59
Message-ID: 87ekx9vg8w.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Thomas Zehetbauer <thomasz(at)hostmaster(dot)org> writes:

> Also will the BUG which causes postgresql to execute a sequential scan
> when using min()/max()/count() ever be fixed? min()/max() can be
> rewritten as SELECT $column ORDER BY $column ASC/DESC LIMIT 1 but this
> should be done by the database, NOT by the user!

First of all, you should take COUNT() out of that list. While MIN/MAX could be
implemented to take advantage of indexes like "DISTINCT ON" (however it's much
more complex than your rewrite indicates), COUNT() *cannot* be done that way.

Nobody is currently working on this or planning to work on this soon. So no,
at least currently it appears this issue will not be changed. Postgresql is
open source and this is the hackers mailing list. Feel free to contribute a
patch.

--
greg

In response to

  • *sigh* at 2003-10-18 01:15:00 from Thomas Zehetbauer

Responses

  • Re: *sigh* at 2003-10-19 17:00:01 from Joshua D. Drake

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2003-10-19 14:47:55 Debian bug report about multibyte in 7.3.3
Previous Message Peter Eisentraut - PostgreSQL 2003-10-18 22:59:09 pgsql-server/src backend/main/main.c backend/t ...