From: Tim Kane <tim.kane@gmail.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Adaptive query execution
Date: Tue, 13 May 2014 21:08:09 +0100
Message-ID: <CF983A39.7EF6F%tim.kane@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Hi all,
So I was thinking about the following, after experimenting with constraint
exclusion.
I thought I would see what happens when I do this:
SELECT * FROM ONLY table_a UNION SELECT * FROM table_b;
I noticed that despite table_a still having no data in it, the planner has
already decided that it needs to insert a chain of ‘append->sort->unique’
nodes into the plan.
That’s fairly reasonable.
While I understand that we can’t readily know about wether a given node will
return anything or not - would it be possible to have the execution engine
branch off in the event that a given node returns nothing at all?
I guess there are probably a lot of considerations, and I suspect it would
considerably increase planning time, though maybe it also presents an
opportunity for some interesting approaches to adaptive query execution.
I don’t know so much about this, though I’m sure there are all kinds of
research papers discussing it.
Is this something that has been considered before?
Tim
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tim.kane@gmail.com
Subject: Re: Adaptive query execution
In-Reply-To: <CF983A39.7EF6F%tim.kane@gmail.com>
* 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