On Thu, Feb 03, 2011 at 05:53:28PM +0200, Peter Eisentraut wrote:
> On tor, 2011-02-03 at 00:10 -0500, Noah Misch wrote:
> > > This is good stuff.  I'll send you a new patch in a day or three for
> > > perhaps another round of performance tests.  Some of the other
> > issues
> > > above can perhaps be postponed for follow-up patches.
> > 
> > I agree -- if the performance-when-unused gets solid, none of my other
> > comments ought to hold things up. 
> 
> Here is a new patch.
> 
> The main change is in varstr_cmp(), avoiding the calls to
> pg_newlocale_from_collation() when the default locale is used.  This
> accounts for the performance regression in my tests.  It also addresses
> some of your refactoring ideas.

Looks good and tests well.  I've attached the same benchmark script with updated
timings, and I've marked the patch Ready for Committer.

nm
-- Setup
-- SELECT setseed(0);
-- CREATE TABLE t (c) AS
-- SELECT chr(1 + (random() * 65534)::int) FROM generate_series(1,10000000) 
gen(n);

-- NOTE: due to concurrent load, timings typically varied 1-2s between runs.

-- en_US.UTF8, unpatched: 68.75s
-- en_US.UTF8,   patched: 67.95s
-- id_ID.UTF8, unpatched: 67.48s
-- id_ID.UTF8,   patched: 69.34s
SELECT min(c)

-- en_US.UTF8,   patched: 81.59s
-- id_ID.UTF8,   patched: 84.59s
--SELECT min(c COLLATE "id_ID")

FROM (
        SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
        UNION ALL SELECT c FROM t
) t_all;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to