On 21.2.2015 00:14, Peter Geoghegan wrote: > On Fri, Feb 20, 2015 at 1:33 PM, Tomas Vondra > <tomas.von...@2ndquadrant.com> wrote: >> For example with the same percentile_disc() test as in the other >> thread: >> >> create table stuff as select random()::numeric as randnum from >> generate_series(1,1000000); >> >> analyze stuff; >> >> select percentile_disc(0) within group (order by randnum) from >> stuff; >> >> >> I get pretty much no difference in runtimes (not even for the >> smallest dataset, where the Datum patch speedup was significant). >> >> What am I doing wrong? > > So you're testing both the patches (numeric + datum tuplesort) at the > same time?
No, I was just testing two similar patches separately. I.e. master vs. each patch separately. > I can't think why this would make any difference. Did you forget to > initdb, so that the numeric sortsupport routine was used? No, but just to be sure I repeated the benchmarks and I still get the same results. Each test run does this: 1) remove data directory 2) initdb 3) copy postgresql.conf (with minor tweaks - work_mem/shared_buffers) 4) start 5) create database 6) create test table 7) run a query 5x I repeated this, just to be sure, but nope - still no speedup :-( For master vs. patch, I do get these results: master patched speedup --------------------------------------------------------- generate_series(1,1000000) 1.20 1.25 0.96 generate_series(1,2000000) 2.75 2.75 1.00 generate_series(1,3000000) 4.40 4.40 1.00 So, no difference :( Scripts attached, but it's really trivial test - hopefully I haven't done anything dumb. -- Tomas Vondra http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
reinit.sh
Description: application/shellscript
bench.sh
Description: application/shellscript
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers