From:
Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To:
Bruce Momjian <bruce(at)momjian(dot)us>
Cc:
Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,
PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Inlining comparators as a performance optimisation
Date:
2011-11-29 18:48:37
Message-ID:
CAEYLb_WSF7Esy9TrbSpzaco+8U0NFLUx2VNSt00ncMdqLba_EQ@mail.gmail.com (view raw or flat )
Thread:
2011-09-20 01:56:01 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-09-20 02:51:32 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-20 23:53:16 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-09-21 01:54:20 from Dan McGee <dan(at)archlinux(dot)org>
2011-09-21 06:51:32 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-09-21 07:01:11 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-21 07:08:42 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-09-21 12:47:46 from Greg Stark <stark(at)mit(dot)edu>
2011-09-21 13:34:49 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-21 15:22:50 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-21 19:21:38 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-21 14:20:55 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-09-21 14:31:11 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-09-21 14:50:22 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-21 15:03:15 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2011-09-21 15:46:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-21 15:56:56 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-09-21 16:13:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2012-01-13 09:48:56 from "Pierre C" <lists(at)peufeu(dot)com>
2012-01-28 14:55:04 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-09-21 16:04:21 from Greg Stark <stark(at)mit(dot)edu>
2011-09-21 16:23:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-21 16:35:41 from Greg Stark <stark(at)mit(dot)edu>
2011-09-26 02:12:55 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-09-26 03:46:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-26 13:53:49 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-10-05 01:49:40 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-10-05 02:55:28 from Greg Stark <stark(at)mit(dot)edu>
2011-10-05 13:55:04 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-10-05 15:31:57 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-11-18 05:20:26 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-18 08:53:09 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-11-18 13:39:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-18 14:11:27 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-11-23 14:48:22 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-11-18 21:38:18 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-19 02:55:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-20 03:29:07 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-20 04:13:36 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-21 02:02:06 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-18 22:08:18 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2011-09-21 16:13:20 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-09-21 16:27:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-09-21 15:43:31 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-21 22:55:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-23 01:09:23 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-23 19:24:22 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-11-25 01:05:15 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-26 18:58:00 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-28 02:15:13 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-29 15:31:45 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-11-29 18:48:37 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-11-29 20:34:40 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-11-29 21:36:26 from Andres Freund <andres(at)anarazel(dot)de>
2011-11-29 21:43:40 from Greg Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
2011-12-01 16:44:55 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-01 17:15:52 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 01:13:02 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-02 02:15:14 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 02:46:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-02 03:22:32 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 03:48:07 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-02 04:00:36 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 05:16:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-02 13:57:48 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 15:11:19 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-02 19:35:32 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-12-02 20:04:45 from Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
2011-12-02 20:21:50 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-02 20:42:21 from Bruce Momjian <bruce(at)momjian(dot)us>
2011-12-03 18:36:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-04 19:17:15 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-05 00:14:33 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-05 13:23:45 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2011-12-05 17:10:05 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-05 17:53:23 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-06 10:40:23 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2011-12-06 16:49:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 17:06:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-06 17:48:35 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 18:07:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-06 18:08:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-06 21:23:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-07 00:18:24 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-07 01:13:59 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-07 03:45:20 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-07 11:57:08 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-07 01:46:27 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-07 14:39:54 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-07 15:09:32 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2011-12-07 15:15:35 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-07 15:58:03 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-07 16:22:30 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-12-16 19:55:12 from Greg Smith <greg(at)2ndQuadrant(dot)com>
2011-12-02 13:33:30 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-02 01:29:56 from Peter Geoghegan <peter(at)2ndquadrant(dot)com>
2011-12-02 01:31:06 from Robert Haas <robertmhaas(at)gmail(dot)com>
2011-09-21 06:55:55 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2011-09-20 13:57:24 from Amit Kapila <amit(dot)kapila(at)huawei(dot)com>
Lists:
pgsql-hackers
On 29 November 2011 15:31, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> These are exciting advanced you are producing and I am hopeful we can
> get this included in Postgres 9.2.
Thanks Bruce.
>I have mentioned already that I
> think parallelism is the next big Postgres challenge, and of course, one
> of the first areas for parallelism is sorting.
I'm not sure that sorting has that much to recommend it as an initial
target of some new backend parallelism other than being easy to
implement. I've observed the qsort_arg specialisations in this patch
out-perform stock qsort_arg by as much as almost 3 times. However, the
largest decrease in a query's time that I've observed was 45%, and
that was for a contrived worst-case for quicksort, but about 25% is
much more typical of queries similar to the ones I've shown, for more
normative data distributions. While that's a respectable gain, it
isn't a paradigm shifting one, and it makes parallelising qsort itself
for further improvements quite a lot less attractive - there's too
many other sources of overhead.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services
In response to
Responses
pgsql-hackers by date
Next :From: Pavel StehuleDate: 2011-11-29 19:37:15
Subject : Re: review: CHECK FUNCTION statement
Previous :From : Jan KundrátDate : 2011-11-29 18:39:40
Subject : Re: [Review] Include detailed information about a row failing
a CHECK constraint into the error message