Re: SortSupport for UUID type

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: SortSupport for UUID type
Дата
Msg-id CA+Tgmob_931ynYTSnes6x7teQH_NehmMqsWaLW9XM36D_SBYmQ@mail.gmail.com
обсуждение исходный текст
Ответ на SortSupport for UUID type  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: SortSupport for UUID type  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Sun, Oct 4, 2015 at 2:21 AM, Peter Geoghegan <pg@heroku.com> wrote:
> 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.

+        tmp = ((uint32) res ^ (uint32) ((uint64) res >> 32));

The outer set of parentheses here seems pretty worthless.  Perhaps one
of the parentheses at the end of the statement should be moved to just
after "res".  That seems like it would add considerably clarity.

> 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.

There is no doubt that we need more reviewers.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Следующее
От: Robert Haas
Дата:
Сообщение: Re: More work on SortSupport for text - strcoll() and strxfrm() caching