Re: Speed of exist - Mailing list pgsql-performance

From Bastiaan Olij
Subject Re: Speed of exist
Date
Msg-id 5123518F.30206@basenlily.me
Whole thread Raw
In response to Re: Speed of exist  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-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
>



pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: slow query plans caused by under-estimation of CTE cardinality
Next
From: Josh Berkus
Date:
Subject: Re: High CPU usage / load average after upgrading to Ubuntu 12.04