Re: More work on SortSupport for text - strcoll() and strxfrm() caching

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Date: 2015-10-04 06:17:55
Message-ID: CAM3SWZSTKmOnosidBYeCY9pJT=hhGUwwmxxpWSEJB7Kf2oGgJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 4, 2015 at 12:41 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Some comments:

I attach a new version of the patch series that incorporates all your
feedback. The patch series is now made cumulative in a way that makes
it easy for someone to independently commit the unsigned integer
comparison optimization for text, and nothing else. The macro that
uses is in a dedicated header now, because I have another patch
(SortSupport for the UUID type) that uses the same optimization for
the same reason. It seems like something that will probably end up
with a third or forth client before too long, so I think the byte swap
macro wrapper belongs in sortsupport.h.

BTW, I think that in practice the merge phase of a tape sort isn't
much helped by comparison caching, contrary to comments appearing in
the original version. The heap data structure used by polyphase merge
has bad properties around locality (both temporal and spatial). I'm
thinking about independently addressing that problem. I now make no
claims about it in this patch.

--
Peter Geoghegan

Attachment Content-Type Size
0003-Add-two-text-sort-caching-optimizations.patch text/x-patch 5.9 KB
0002-Use-unsigned-integer-abbreviated-keys-for-text.patch text/x-patch 2.4 KB
0001-Add-BSWAP64-byte-swapping-macro.patch text/x-patch 9.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-10-04 06:21:05 SortSupport for UUID type
Previous Message Shay Rojansky 2015-10-04 05:59:17 Odd query execution behavior with extended protocol