Re: EXPLAIN ANALYZE output weird for Top-N Sort

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: EXPLAIN ANALYZE output weird for Top-N Sort
Дата
Msg-id 22880.1415976879@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: EXPLAIN ANALYZE output weird for Top-N Sort  (Jeremy Harris <jgh@wizmail.org>)
Ответы Re: EXPLAIN ANALYZE output weird for Top-N Sort  (Jeremy Harris <jgh@wizmail.org>)
Список pgsql-hackers
Jeremy Harris <jgh@wizmail.org> writes:
> On 14/11/14 00:46, Simon Riggs wrote:
>> Limit  (cost=.... rows=20 width=175) (actual time=.... rows=20 loops=1)
>> ->  Sort  (cost=.... rows=568733 width=175) (actual time=....
>> rows=20 loops=1)
>> Sort Method: top-N heapsort

> Going off on a tangent, when I was playing with a merge-sort
> implementation I propagated limit information into the sort
> node, for a significant win.

I'm not entirely following.  The top-N heapsort approach already
makes use of the limit info.

If the limit is so large that the sort spills to disk, then we
stop thinking about the limit.  But I'm finding it doubtful either
that that's a case worthy of extra code or that you could get very
much win if you did add code for it.
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Teaching pg_dump to use NOT VALID constraints
Следующее
От: Andres Freund
Дата:
Сообщение: Re: REINDEX CONCURRENTLY 2.0