Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Дата
Msg-id 4005.1178296698@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Gregory Stark <stark@enterprisedb.com>)
Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-committers
Magnus Hagander <magnus@hagander.net> writes:
> Could we show it in EXPLAIN ANALYZE somehow? I'm thinking it would be good
> to see at runtime (for example as a hint that if you put in a bit more
> work_mem it might get used)

I don't see that this is any more interesting than whether the sort
spilled to disk or not; which is something we don't show in EXPLAIN
ANALYZE either.  trace_sort is the agreed API for examining that.
It's not exactly easy to do, because (a) none of this information
is exposed outside tuplesort.c, and (b) the tuplesortstate object
is probably gone by the time EXPLAIN ANALYZE runs, anyway.

            regards, tom lane

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first