Search Postgresql Archives

Re: 8.2.4 serious slowdown

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

 



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 <sim@xxxxxxxxxxxxxx>
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux