From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make nodeSort.c use Datum sorts for single column sorts
Date: Thu, 22 Jul 2021 02:03:38 +0000
Message-ID: <E1m6O3m-0007XT-O6@gemulon.postgresql.org> (raw)
Make nodeSort.c use Datum sorts for single column sorts
Datum sorts can be significantly faster than tuple sorts, especially when
the data type being sorted is a pass-by-value type. Something in the
region of 50-70% performance improvements appear to be possible.
Just in case there's any confusion; the Datum sort is only used when the
targetlist of the Sort node contains a single column, not when there's a
single column in the sort key and multiple items in the target list.
Author: Ronan Dunklau
Reviewed-by: James Coleman, David Rowley, Ranier Vilela, Hou Zhijie
Tested-by: John Naylor
Discussion: https://postgr.es/m/3177670.itZtoPt7T5@aivenronan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/91e9e89dccdfdf4216953d3d8f5515dcdef177fb
Modified Files
--------------
src/backend/executor/nodeSort.c | 106 ++++++++++++++++++++++++++++++----------
src/include/nodes/execnodes.h | 1 +
2 files changed, 82 insertions(+), 25 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: drowley@postgresql.org
Subject: Re: pgsql: Make nodeSort.c use Datum sorts for single column sorts
In-Reply-To: <E1m6O3m-0007XT-O6@gemulon.postgresql.org>
References: <E1m6O3m-0007XT-O6@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox