SortSupport for UUID type

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: SortSupport for UUID type
Date: 2015-10-04 06:21:05
Message-ID: CAM3SWZR4avsTwwNVUzRNbHk8v36W-QBqpoKg=OGkWWy0dKtWBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Attached is SortSupport for UUID type patch. This accelerates all UUID
related sort-intense operations, making them about twice as fast with
millions of tuples. I know that Heroku has plenty of tables used by
various applications with a UUID primary key, so it will be nice to
have CREATE INDEX go so much faster in those cases. The SortSupport
routine uses abbreviation, and relies on unsigned integer comparisons.
It has a dependency on the new abbreviated key for text patch series
[1].

For full details, see commit message. It's a bit unfortunate that I
have yet another sort patch here, without being much closer to getting
every other such patch committed, but I happened to have written this
patch a while ago. I wanted to shape-up the common API that this patch
and the related text patch use, so it just made sense to submit the
UUID patch now.

This patch is not all that exciting -- the techniques used here are
very simple, and it's all familiar territory for us. I expect that
this patch will not be at all contentious when someone eventually gets
around to reviewing it.

[1] http://www.postgresql.org/message-id/CAM3SWZSTKmOnosidBYeCY9pJT=hhGUwwmxxpWSEJB7Kf2oGgJA@mail.gmail.com
--
Peter Geoghegan

Attachment Content-Type Size
0004-Add-SortSupport-routine-for-UUID-data-type.patch text/x-patch 8.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-10-04 06:33:35 Re: 9.3.9 and pg_multixact corruption
Previous Message Peter Geoghegan 2015-10-04 06:17:55 Re: More work on SortSupport for text - strcoll() and strxfrm() caching