Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism
Дата
Msg-id 20190523223654.tpkigtzavpjxluj4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2019-05-23 18:31:43 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > It's also noticable that we preposterously assume that the sort actually
> > will return exactly the number of rows in the table, despite being a
> > top-n style sort.
> 
> In general, we report nodes below LIMIT with their execute-to-completion
> cost and rowcount estimates.  Doing differently for a top-N sort would
> be quite confusing, I should think.

I'm not quite sure that's true. I mean, a top-N sort wouldn't actually
necessarily return all the input rows, even if run to completion. Isn't
that a somewhat fundamental difference?

Greetings,

Andres Freund



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

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: ClosePipeStream failure ignored in pg_import_system_collations
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Question about BarrierAttach spinlock