Re: B-Tree support function number 3 (strxfrm() optimization)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Date: 2014-09-15 18:20:43
Message-ID: CA+Tgmobzr1OQhLdD8JJrKSQuPN2KssC-sUVQfNjd_FUpMm83BQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 15, 2014 at 1:55 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Mon, Sep 15, 2014 at 10:53 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> I think there's probably more than that to work out, but in any case
>> there's no harm in getting a simple optimization done first before
>> moving on to a complicated one.
>
> I guess we never talked about the abort logic in all that much detail.
> I suppose there's that, too.

Well, the real point is that from where I'm sitting, this...

>> x = memcmp();
>> if (x == 0)
>> return x;
>> y = strcoll();
>> if (y == 0)
>> return x;
>> return y;

...looks like about a 10-line patch. We have the data to show that
the loss is trivial even in the worst case, and we have or should be
able to get data showing that the best-case win is significant even
without the abbreviated key stuff. If you'd care to draft a patch for
just that, I assume we could get it committed in a day or two, whereas
I'm quite sure that considerably more work than that remains for the
main patch.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-09-15 18:21:25 Re: jsonb contains behaviour weirdness
Previous Message Peter Geoghegan 2014-09-15 18:18:05 Re: jsonb contains behaviour weirdness