Re: OOM-killer issue with a specific query 11 of 20) - Mailing list pgsql-performance

From nabble.30.miller_2555@spamgourmet.com
Subject Re: OOM-killer issue with a specific query 11 of 20)
Date
Msg-id CABLpH8wavcn73Z-+HJZSP18DW3hNdM7VHsrNXnfc8VVZ57G7Pw@mail.gmail.com
Whole thread Raw
In response to OOM-killer issue with a specific query  (nabble.30.miller_2555@spamgourmet.com)
List pgsql-performance
On Tue, Dec 20, 2011 at 11:15 AM, F. BROUARD / SQLpro -
sqlpro@club-internet.fr
<+nabble+miller_2555+ca434688eb.sqlpro#club-internet.fr@spamgourmet.com>
wrote:
> I should think your query is not correct.
>
> Le 19/12/2011 16:52, nabble.30.miller_2555@spamgourmet.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.


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Guidance Requested - Bulk Inserting + Queries
Next
From: nabble.30.miller_2555@spamgourmet.com
Date:
Subject: Re: OOM-killer issue with a specific query SOLVED