From: Bruce Momjian <bruce@momjian.us>
To: Thiago Godoi <thiagogodoi10@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Intersect/Union X AND/OR
Date: Fri, 2 Dec 2011 14:49:42 -0500 (EST)
Message-ID: <201112021949.pB2Jng821759@momjian.us> (raw)
In-Reply-To: <CAFQfwCpF53m6R+PmmAxD3Vmggzt93LbJx05on4_9Rx=di9D9MA@mail.gmail.com>
Thiago Godoi wrote:
> Hi all,
>
> I found this presentation from B. Momjian:
>
> http://momjian.us/main/writings/pgsql/performance.pdf
>
> I'm interested in what he said about " Intersect/Union X AND/OR " , Can I
> find a transcription or a video of this presentation? Can anyone explain it
> to me?
Well, there is a recording of the webcast on the EnterpriseDB web site,
but I am afraid they only allow viewing of 3+ hour webcasts by
EnterpriseDB customers.
The idea is that a query that uses an OR can be rewritten as two SELECTs
with a UNION between them. I have seen rare cases where this is a win,
so I mentioned it in that talk. Intersection is similarly possible for
AND in WHERE clauses.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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-performance@postgresql.org
Cc: bruce@momjian.us, thiagogodoi10@gmail.com
Subject: Re: Intersect/Union X AND/OR
In-Reply-To: <201112021949.pB2Jng821759@momjian.us>
References: <CAFQfwCpF53m6R+PmmAxD3Vmggzt93LbJx05on4_9Rx=di9D9MA@mail.gmail.com> <201112021949.pB2Jng821759@momjian.us>
* 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