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

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Дата
Msg-id 20070504164735.GF30617@svr2.hagander.net
обсуждение исходный текст
Ответ на Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Fri, May 04, 2007 at 12:38:18PM -0400, Tom Lane wrote:
> 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.

Now that you mention it, that'd be nice to have as well - the point being
making it available without recompile.

> 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.

Hmm. Ok. Don't know enough about those parts of the code to comment on
that, but I'll certainly take your word for it :-)

//Magnus


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Add a line to the EXPLAIN ANALYZE output for a Sort node, showing