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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 20, 2011 at 11:15 AM, F. BROUARD / SQLpro -
sqlpro@xxxxxxxxxxxxxxxx
<+nabble+miller_2555+ca434688eb.sqlpro#club-internet.fr@xxxxxxxxxxxxxxx>
wrote:
> I should think your query is not correct.
>
> Le 19/12/2011 16:52, nabble.30.miller_2555@xxxxxxxxxxxxxxx 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.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux