Re: Optimizing DISTINCT with LIMIT

Поиск
Список
Период
Сортировка
От tmp
Тема Re: Optimizing DISTINCT with LIMIT
Дата
Msg-id gh9bcj$2o2q$1@news.hub.org
обсуждение исходный текст
Ответ на Re: Optimizing DISTINCT with LIMIT  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Optimizing DISTINCT with LIMIT  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
> In principle, if there are no aggregate functions, then nodeAgg could
> return a row immediately upon making any new entry into the hash table.
> Whether it's worth the code uglification is debatable ... I think it
> would require a third major pathway through nodeAgg.

Regarding whether it's worth the effort: In each of my three past jobs 
(all using postgresql) I have met several queries that would fetch a 
small subset of a large - even huge - input. I think that types of 
queries are relatively common out there, but if they are executed for 
e.g. a web-client it is simply a no-go with the current late LIMIT 
evaluation.

Also, it is my impression that many people use LIMIT to minimize the 
evaluation time of sub queries from which the outer query only needs a 
small subset of the sub query output.


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Simple postgresql.conf wizard
Следующее
От: David Fetter
Дата:
Сообщение: Re: [patch] pg_upgrade script for 8.3->8.4