From: Bastiaan Olij <bastiaan@basenlily.me>
To: pgsql-performance@postgresql.org
Subject: Re: Speed of exist
Date: Tue, 19 Feb 2013 21:18:55 +1100
Message-ID: <5123518F.30206@basenlily.me> (raw)
In-Reply-To: <CAFj8pRAUp0SNc5Ur-aYaUpDUXjjRPxC0TozRPwGZ3v4fZFEEqA@mail.gmail.com>
References: <51231D10.1070101@basenlily.me>
<51232A36.6000701@orprovision.com>
<51232B90.2080504@basenlily.me>
<CAFj8pRAUp0SNc5Ur-aYaUpDUXjjRPxC0TozRPwGZ3v4fZFEEqA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Hi Pavel,
That is what I've done in this particular case but there are parts where
I use exist checks in this way that are very cumbersome to write out
like that so I'm hoping there is a way to make the optimizer work with
existence checks in this way.
Cheers,
Bastiaan Olij
On 19/02/13 6:39 PM, Pavel Stehule wrote:
> 2013/2/19 Bastiaan Olij <bastiaan@basenlily.me>:
>> Hi Andy,
>>
>> I've tried that with the same result. One subquery works beautifully,
>> two subqueries with an OR and it starts to do a sequential scan...
> try to rewrite OR to two SELECTs joined by UNION ALL
>
> Pavel
>
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: bastiaan@basenlily.me
Subject: Re: Speed of exist
In-Reply-To: <5123518F.30206@basenlily.me>
* 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