On Mon, Aug 4, 2014, at 06:40 PM, Jon Rosebaugh wrote:
> On Tue, Jul 29, 2014, at 05:38 PM, David G Johnston wrote:
> > You should at least provide some explain a/o explain analyse results.
> >
> > Not to sound pedantic here but you are not JOINing on the CTE, you are
>
On Tue, Jul 29, 2014, at 05:38 PM, David G Johnston wrote:
> You should at least provide some explain a/o explain analyse results.
>
> Not to sound pedantic here but you are not JOINing on the CTE, you are
> pushing it into WHERE clause via a pair of sub-selects.
Fair criticisms. Okay, here we go
I have a CTE that produces some row ids. I want to do a query with a
complicated join based on those row ids. I've tried running them split
into two (run CTE query, collect row ids, then run the complicated query
with id IN (id_1, id_2, id_3)) and it takes only a few seconds to run,
but when I run