From:
Robert Haas <robertmhaas(at)gmail(dot)com>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Bruce Momjian <bruce(at)momjian(dot)us>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Inlining comparators as a performance optimisation
Date:
2011-12-06 17:48:35
Message-ID:
CA+TgmoYw_iOWmU36J1Y=X29vyjNEHO3rniO6L4sRwRXYV7X84g@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 Tue, Dec 6, 2011 at 12:06 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Sun, Dec 4, 2011 at 2:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> * We're going to want to expose PrepareSortSupportComparisonShim
>>> for use outside tuplesort.c too, and possibly refactor
>>> tuplesort_begin_heap so that the SortKey setup logic inside it
>>> can be extracted for use elsewhere. Shall we just add those to
>>> tuplesort's API, or would it be better to create a sortsupport.c
>>> with these sorts of functions?
>
>> Why are we going to want to do that? If it's because there are other
>> places in the code that can make use of a fast comparator that don't
>> go through tuplesort.c, then we should probably break it off into a
>> separate file (sortkey.c?). But if it's because we think that clients
>> of the tuplesort code are going to need it for some reason, then we
>> may as well keep it in tuplesort.c.
>
> My expectation is that nbtree, as well as mergejoin and mergeappend,
> would get converted over to use the fast comparator API. I looked at
> that a little bit but didn't push it far enough to be very sure about
> whether they'd be able to share the initialization code from
> tuplesort_begin_heap. But they're definitely going to need the shim
> function for backwards compatibility, and
> PrepareSortSupportComparisonShim was my first cut at a wrapper that
> would be generally useful.
OK. Well, then pushing it out to a separate file probably makes
sense. Do you want to do that or shall I have a crack at it? If the
latter, what do you think about using the name SortKey for everything
rather than SortSupport?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
In response to
Responses
pgsql-hackers by date
Next :From: Euler Taveira de OliveiraDate: 2011-12-06 18:00:51
Subject : Re: xlog location arithmetic
Previous :From : Euler Taveira de OliveiraDate : 2011-12-06 17:39:21
Subject : Re: xlog location arithmetic