Actually I just checked and the plan is exactly the same for those 2 clauses.



-------- Original Message  --------
Subject: Re:8.2.4 serious slowdown
From: Sim Zacks <[EMAIL PROTECTED]>
To:
Date: Sunday, January 13, 2008 07:59:22 AM

> How would you rewrite something like:
>   WHERE (COALESCE(b.quantity, 0) - COALESCE(b.deliveredsum, 0)) > 0;
> I could write:
> where case when b.quantity is null then 0 else b.quantity end - case
> when b.deliveredsum is null then 0 else b.deliveredsum end > 0
>
> It is butt ugly, but is that the most efficient way to write it in 8.2.4?
>
> Sim
>

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to