Re: *sigh*

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: *sigh*
Дата
Msg-id 87ekx9vg8w.fsf@stark.dyndns.tv
обсуждение исходный текст
Ответ на *sigh*  (Thomas Zehetbauer <thomasz@hostmaster.org>)
Ответы Re: *sigh*  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-hackers
Thomas Zehetbauer <thomasz@hostmaster.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Dreaming About Redesigning SQL
Следующее
От: Michael Meskes
Дата:
Сообщение: Debian bug report about multibyte in 7.3.3