pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <rhodiumtoad@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Order active window clauses for greater reuse of Sort nodes.
Date: Fri, 14 Sep 2018 16:36:19 +0000
Message-ID: <E1g0r4t-0005Ox-Hu@gemulon.postgresql.org> (raw)

Order active window clauses for greater reuse of Sort nodes.

By sorting the active window list lexicographically by the sort clause
list but putting longer clauses before shorter prefixes, we generate
more chances to elide Sort nodes when building the path.

Author: Daniel Gustafsson (with some editorialization by me)
Reviewed-by: Alexander Kuzmenkov, Masahiko Sawada, Tom Lane
Discussion: https://postgr.es/m/124A7F69-84CD-435B-BA0E-2695BE21E5C2%40yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/728202b63cdcd7fb73fdba114903ed235eb02f3a

Modified Files
--------------
src/backend/nodes/list.c             |   7 +-
src/backend/optimizer/plan/planner.c | 154 +++++++++++++++++++++++++----------
src/test/regress/expected/window.out |  60 +++++++++++---
src/test/regress/sql/window.sql      |  16 ++++
4 files changed, 177 insertions(+), 60 deletions(-)



Message-ID: <E1g0r4t-0005Ox-Hu@gemulon.postgresql.org>
Permalink:  ../E1g0r4t-0005Ox-Hu@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1g0r4t-0005Ox-Hu@gemulon.postgresql.org

 · 

reply

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: rhodiumtoad@postgresql.org
  Subject: Re: pgsql: Order active window clauses for greater reuse of Sort nodes.
  In-Reply-To: <E1g0r4t-0005Ox-Hu@gemulon.postgresql.org>
  References: <E1g0r4t-0005Ox-Hu@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