Re: how to reach D5 in tuplesort.c 's polyphase merge algorithm? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: how to reach D5 in tuplesort.c 's polyphase merge algorithm?
Date
Msg-id 12043.1405722373@sss.pgh.pa.us
Whole thread Raw
In response to how to reach D5 in tuplesort.c 's polyphase merge algorithm?  (土卜皿 <pengcz.nwpu@gmail.com>)
Responses Re: how to reach D5 in tuplesort.c 's polyphase merge algorithm?  (土卜皿 <pengcz.nwpu@gmail.com>)
List pgsql-hackers
土卜皿 <pengcz.nwpu@gmail.com> writes:
>   for studying polyphase merge algorithm of tuplesort.c, I use ddd and
> apend a table, which has a schema as follows:
> ...
> and has 36684 records, and every record is like:
> id          code  article  name      department
> 31800    266    \N    Machault    77

> and for getting into external sort, I type the following command:

> select * from towns order by name desc;

> but I found it need not reach D5 and D6 during sorting,

That doesn't sound like enough data to force it to spill to disk at all;
at least not unless you turn down work_mem to some very small value.
        regards, tom lane



pgsql-hackers by date:

Previous
From: 土卜皿
Date:
Subject: how to reach D5 in tuplesort.c 's polyphase merge algorithm?
Next
From: 土卜皿
Date:
Subject: Re: how to reach D5 in tuplesort.c 's polyphase merge algorithm?