Re: OOM-killer issue with a specific query 11 of 20)

From: nabble(dot)30(dot)miller_2555(at)spamgourmet(dot)com
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: OOM-killer issue with a specific query 11 of 20)
Date: 2011-12-20 18:33:10
Message-ID: CABLpH8wavcn73Z-+HJZSP18DW3hNdM7VHsrNXnfc8VVZ57G7Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Dec 20, 2011 at 11:15 AM, F. BROUARD / SQLpro -
sqlpro(at)club-internet(dot)fr
<+nabble+miller_2555+ca434688eb(dot)sqlpro#club-internet(dot)fr(at)spamgourmet(dot)com>
wrote:
> I should think your query is not correct.
>
> Le 19/12/2011 16:52, nabble(dot)30(dot)miller_2555(at)spamgourmet(dot)com a écrit :
>>
>> SELECT "bigint", "date", "text"
>> FROM tableA AS A
>> WHERE A."boolean" = 'true' AND
>> (A."text" = 'abc' OR A."text" = 'xyz') AND
>> A."bigint" NOT IN (SELECT "bigint" FROM tableB)
>> ORDER BY A."date" DESC;
>
>
> Why do you cast the true as a string ?
> Can't you be more simple like :
> WHERE A."boolean" = true
> and that's all ?
> or much more simple :
> WHERE A."boolean"
>
That is true - I was actually quoting the value as a literal to make
the query more explicit in the post ... probably not the best judgment
in hindsight given posting to a performance-based mailing list :-). I
do use the WHERE A."boolean" clause in the actual SQL query to avoid
the unneccesary parsing & type casting. Apologies for any confusion.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2011-12-20 20:46:46 Re: OOM-killer issue with a specific query 9 of 20)
Previous Message nabble.30.miller_2555 2011-12-20 16:46:02 Re: OOM-killer issue with a specific query 9 of 20)