Re: Minor performance improvement in transition to external sort

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Jeremy Harris <jgh(at)wizmail(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor performance improvement in transition to external sort
Date: 2014-04-17 13:23:45
Message-ID: CA+TgmoadZPOB4ERYWQCH614_Xn=LCMJ2dJkb-Zeiz=qo==TDDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 16, 2014 at 7:38 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Thu, Apr 10, 2014 at 06:03:15PM +0100, Simon Riggs wrote:
>> On 6 February 2014 18:21, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
>> > On Tue, Feb 4, 2014 at 2:22 PM, Jeremy Harris <jgh(at)wizmail(dot)org> wrote:
>> >>
>> >> The attached patch replaces the existing siftup method for heapify with
>> >> a siftdown method. Tested with random integers it does 18% fewer
>> >> compares and takes 10% less time for the heapify, over the work_mem
>> >> range 1024 to 1048576.
>> >
>> >
>> > Thanks for working on this.
>>
>> +1
>>
>> Your patch isn't linked properly from the CF manager though.
>>
>> If you like patches like this then there's a long(er) list of
>> optimizations already proposed previously around sorting. It would be
>> good to have someone work through them for external sorts. I believe
>> Noah is working on parallel internal sort (as an aside).
>>
>> There's also an optimization possible for merge joins where we use the
>> output of the first sort as an additional filter on the second sort.
>> That can help when we're going to join two disjoint tables.
>
> Where should this be recorded? TODO? Commitfest manager?

IIUC, the original patch was withdrawn; any remaining action items
should probably go to TODO. I'm not sure which specific idea you're
referring to, though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-04-17 13:40:22 Re: Clock sweep not caching enough B-Tree leaf pages?
Previous Message Robert Haas 2014-04-17 13:21:45 Re: Need Multixact Freezing Docs