Re: 8.2.4 serious slowdown - Mailing list pgsql-general

From Sim Zacks
Subject Re: 8.2.4 serious slowdown
Date
Msg-id fm76ju$11rv$1@news.hub.org
Whole thread Raw
In response to Re: 8.2.4 serious slowdown  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 8.2.4 serious slowdown
List pgsql-general
I changed it to "where f.commited is not true" and the query now takes 1 second as opposed to 60.
(much faster then the 3 seconds it took on 8.0.1, which could also be because of the coalesce there)
Is it considered better practice (or more efficient) to always use (x is not or x=value)
instead of coalesce? Or does it make more sense to turn on the option "transform_null_equals"?

Thank you much
Sim

> I assume that the original query is something along the lines of
>
>     d left join f on (...) where coalesce(f.commited, false) = false
>
>
> In the meantime, Sim would probably have better luck if he restructured
> this particular clause in some other way, say
>
>     where f.commited is not true
> or
>     where f.commited = false or f.commited is null
>
> Note also that he really ought to move up to 8.2.6, as 8.2.4 is not
> very sane about what IS NULL means for a left join's result.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

pgsql-general by date:

Previous
From: Cefull Lo
Date:
Subject: phpPgAdmin-4.1.3 login fail
Next
From: Richard Huxton
Date:
Subject: Re: phpPgAdmin-4.1.3 login fail