Re: [PATCH] Incremental sort (was: PoC: Partial sort)

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: James Coleman <jtc331(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Shaun Thomas <shaun(dot)thomas(at)2ndquadrant(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Date: 2019-09-12 15:49:29
Message-ID: 20190912154929.GA2254@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jul-30, Tomas Vondra wrote:

> On Sun, Jul 21, 2019 at 01:34:22PM +0200, Tomas Vondra wrote:
> >
> > I wonder if we're approaching this wrong. Maybe we should not reverse
> > engineer queries for the various places, but just start with a set of
> > queries that we want to optimize, and then identify which places in the
> > planner need to be modified.

[...]

> I've decided to do a couple of experiments, trying to make my mind about
> which modified places matter to diffrent queries. But instead of trying
> to reverse engineer the queries, I've taken a different approach - I've
> compiled a list of queries that I think are sensible and relevant, and
> then planned them with incremental sort enabled in different places.

[...]

> The list of queries (synthetic, but hopefully sufficiently realistic)
> and a couple of scripts to collect the plans is in this repository:
>
> https://github.com/tvondra/incremental-sort-tests-2
>
> There's also a spreadsheet with a summary of results, with a visual
> representation of which GUCs affect which queries.

OK, so we have that now. I suppose this spreadsheet now tells us which
places are useful and which aren't, at least for the queries that you've
tested. Dowe that mean that we want to get the patch to consider adding
paths only the places that your spreadsheet says are useful? I'm not
sure what the next steps are for this patch.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-09-12 15:51:10 Leakproofness of texteq()/textne()
Previous Message Antonin Houska 2019-09-12 15:35:21 Re: Pulling up direct-correlated ANY_SUBLINK