From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Consider fractional paths in generate_orderedappend_paths
Date: Wed, 12 Jan 2022 21:48:28 +0000
Message-ID: <E1n7lTo-0004Vp-SZ@gemulon.postgresql.org> (raw)
Consider fractional paths in generate_orderedappend_paths
When building append paths, we've been looking only at startup and total
costs for the paths. When building fractional paths that may eliminate
the cheapest one, because it may be dominated by two separate paths (one
for startup, one for total cost).
This extends generate_orderedappend_paths() to also consider which paths
have lowest fractional cost. Currently we only consider paths matching
pathkeys - in the future this may be improved by also considering paths
that are only partially sorted, with an incremental sort on top.
Original report of an issue by Arne Roland, patch by me (based on a
suggestion by Tom Lane).
Reviewed-by: Arne Roland, Zhihong Yu
Discussion: https://postgr.es/m/e8f9ec90-546d-e948-acce-0525f3e92773%40enterprisedb.com
Discussion: https://postgr.es/m/1581042da8044e71ada2d6e3a51bf7bb%40index.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6b94e7a6da2f1c6df1a42efe64251f32a444d174
Modified Files
--------------
src/backend/optimizer/path/allpaths.c | 69 +++++++++++++++++++++++++++-
src/test/regress/expected/partition_join.out | 48 +++++++++++++++++++
src/test/regress/sql/partition_join.sql | 25 ++++++++++
3 files changed, 141 insertions(+), 1 deletion(-)
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: tomas.vondra@postgresql.org
Subject: Re: pgsql: Consider fractional paths in generate_orderedappend_paths
In-Reply-To: <E1n7lTo-0004Vp-SZ@gemulon.postgresql.org>
References: <E1n7lTo-0004Vp-SZ@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