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 20070504162638.GD30617@svr2.hagander.net
обсуждение исходный текст
Ответ на Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы 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 10:04:08AM -0400, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > Is there some way to see in the generated query plan if this optimisation
> > is used?
>
> If there's a SORT just below a LIMIT (that has a limit, ie it's not just
> an OFFSET), then it's potentially used.  Whether it's actually used
> depends on actual row counts and widths at runtime --- you'd have to
> turn on trace_sort and look at the log output to determine that.

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)

//Magnus


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

Предыдущее
От: dpage@pgfoundry.org (User Dpage)
Дата:
Сообщение: pginstaller - pginst: Updated Russian translation from Andrey Repko
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Teach tuplesort.c about "top N" sorting, in which only the first