Re: sortsupport for text

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Noah Misch" <noah(at)leadboat(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sortsupport for text
Date: 2012-03-08 16:29:56
Message-ID: 4F588A240200002500046025@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Fri, Mar 02, 2012 at 03:45:38PM -0500, Robert Haas wrote:

>> SELECT SUM(1) FROM (SELECT * FROM randomtext ORDER BY t) x;

>> [13% faster with patch for C collation; 7% faster for UTF8]

>> I had hoped for more like a 15-20% gain from this approach, but
>> it didn't happen, I suppose because some of the instructions
>> saved just resulted in more processor stalls. All the same, I'm
>> inclined to think it's still worth doing.
>
> This is a border case, but I suggest that a 13% speedup on a
> narrowly-tailored benchmark, degrading to 7% in common
> configurations, is too meager to justify adopting this patch.

We use the C collation and have character strings in most indexes
and ORDER BY clauses. Unless there are significant contra-
indications, I'm in favor of adopting this patch.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-08 16:30:52 Re: Collect frequency statistics for arrays
Previous Message Bruce Momjian 2012-03-08 16:26:23 Re: pg_upgrade --logfile option documentation