Re: Seqscan in MAX(index_column)
От
scott.marlowe
Тема
Re: Seqscan in MAX(index_column)
Дата
Msg-id
Pine.LNX.4.33.0309050954340.30557-100000@css120.ihs.com
Ответ на
Re: Seqscan in MAX(index_column) (Greg Stark)
Список
Дерево обсуждения
Re: Seqscan in MAX(index_column) Christopher Browne <cbbrowne@acm.org>
Re: Seqscan in MAX(index_column) Tom Lane <tgl@sss.pgh.pa.us>
Re: Seqscan in MAX(index_column) Bruce Momjian <pgman@candle.pha.pa.us>
Re: Seqscan in MAX(index_column) Dennis Bjorklund <db@zigo.dhs.org>
Would it be possible to catch an unconstrained max(id)/min(id) and rewrite it as "select id from table order by id [desc] limit1" on the fly in the parser somewhere? That would require fairly little code, and be transparent to the user. I.e. low hanging fruit. On 5 Sep 2003, Greg Stark wrote: > Note that that only handles min()/max() for the whole table. It doesn't handle > the GROUP BY case, for that you need DISTINCT ON with an ORDER BY clause.
В списке pgsql-hackers по дате отправления