From: Tim Kane <tim.kane@gmail.com>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Adaptive query execution
Date: Tue, 13 May 2014 21:33:58 +0100
Message-ID: <CF983E13.7EFDD%tim.kane@gmail.com> (raw)
In-Reply-To: <CAGTBQpY9+iYnkOeSYXDJ3V_VJnZczsXpgSbzF5BEjv9SpDvcnA@mail.gmail.com>
References: <CF983A39.7EF6F%tim.kane@gmail.com>
<CAGTBQpY9+iYnkOeSYXDJ3V_VJnZczsXpgSbzF5BEjv9SpDvcnA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
>
>
> From: Claudio Freire <klaussfreire@gmail.com>
>> I thought I would see what happens when I do this:
>>
>> SELECT * FROM ONLY table_a UNION SELECT * FROM table_b;
>>
>>
>>
> What's the point, in the context of this example?
>
> The sort-unique still has to be performed even if you didn't have data
> in one side, since the other could still have duplicates.
Damn it. Okay, bad example. I should sleep.
A better example would be (from my other post just now -
http://www.postgresql.org/message-id/CF9838D8.7EF3D%tim.kane@gmail.com )
where an empty parent-table is append’ed into a result set involving one
(and only one) of its child relations. Whereas a more optimum solution
would involve only the child relation without the need to append the empty
parent relation.
I’m sure there are other scenarios where adaptive query execution would be
of greater benefit.
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, klaussfreire@gmail.com
Subject: Re: Adaptive query execution
In-Reply-To: <CF983E13.7EFDD%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