From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com> |
Cc: | "mac_man2008(at)yahoo(dot)it" <mac_man2008(at)yahoo(dot)it>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Sorting. When? |
Date: | 2011-02-11 01:17:43 |
Message-ID: | AANLkTinD1WdwQ7g0xDxfK_LqnbECcqcqiLtKfyC_Z58U@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 10, 2011 at 6:21 PM, Nicolas Barbier
<nicolas(dot)barbier(at)gmail(dot)com> wrote:
> 2011/2/10 mac_man2008(at)yahoo(dot)it <mac_man2008(at)yahoo(dot)it>:
>
>> Which operations invoke the sorting algorithms implemented in the sorting
>> module (tuplesort.c) ?
>> Of course, one of those operations invoking sorting is the ORDER BY clause
>> and the DISTINCT too.
>>
>> Moreover, the Merge Join should be implemented invoking sorting.
>>
>> Is there any other operation invoking sorting?
>
> AFAIK, all set operators except for UNION ALL. (I am probably missing
> a whole boatload of other things.)
Merge joins don't necessarily involve a sort - you could do a merge
over a pair of index scans, for example.
Set operations can be implemented using hashing or sorting, too.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Hunsaker | 2011-02-11 01:28:24 | Re: Careful PL/Perl Release Not Required |
Previous Message | Robert Haas | 2011-02-11 00:38:43 | Re: ALTER EXTENSION UPGRADE, v3 |