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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Teach tuplesort.c about "top N" sorting, in which only the first
Дата
Msg-id 11029.1178314765@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Teach tuplesort.c about "top N" sorting, in which only the first  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Список pgsql-hackers
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc> writes:
> Guillaume Smet wrote:
>> On 5/4/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Sort Method: disk  Memory: 1000KB  Disk: 18482KB
>> 
>> +1 for this one.

> I like that one too ...

OK, in the event it looks like one of these four messages:
 "Sort Method:  top-N heapsort  Memory: %ldkB" "Sort Method:  quicksort  Memory: %ldkB" "Sort Method:  external sort
Disk:%ldkB" "Sort Method:  external merge  Disk: %ldkB"
 

where "external merge" implies that the final merge pass was done
on-the-fly instead of materializing the fully sorted data on disk.
I'm not wedded to these method descriptions if anyone has better phrases
in mind.

Also, I tried to make the disk cases print disk and memory usage both,
but was getting wacko numbers for memory usage.  I had forgotten that
the disk-sort path doesn't bother to track memory usage accurately once
it starts returning tuples to the caller (since at that point all the
decisions are made).  I'm not really excited about fixing that; it
would add per-tuple overhead for not much value.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] Removing pg_auth_members.grantor (was Grantor name gets lost when grantor role dropped)
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [BUGS] Removing pg_auth_members.grantor (was Grantor name gets lost when grantor role dropped)