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.