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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, Marti Raudsepp <marti(at)juffo(dot)org>, Greg Stark <stark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: B-Tree support function number 3 (strxfrm() optimization)
Date: 2015-01-19 20:51:43
Message-ID: 20150119205143.GL3062@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> On the PPC64 machine I normally use for performance testing, it takes
> about 6.3 seconds to build the index with the commit just before this
> one. With this commit, it drops to 1.9 seconds. That's more than a
> 3x speedup!
>
> Now, if I change the query that creates the table to this.
>
> rhaas=# create table stuff as select 'aaaaaaaa' || random()::text as
> a, 'filler filler filler'::text as b, g as c from generate_series(1,
> 1000000) g;
>
> ...then it takes 10.8 seconds with or without this patch. In general,
> any case where the first few characters of every string are exactly
> identical (or only quite rarely different) will not benefit, but many
> practical cases will benefit significantly. Also, Peter's gone to a
> fair amount of work to make sure that even when the patch does not
> help, it doesn't hurt, either.
>
> So that's pretty cool.

Wow, nice!

Good work Peter!

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-19 20:55:30 Re: documentation update for doc/src/sgml/func.sgml
Previous Message Dan Langille 2015-01-19 20:49:19 PGCon 2015 - last day