Search Postgresql Archives

Re: Logical Aggregate Functions (eg ANY())

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

 



On 12/15/11, Marti Raudsepp <marti@xxxxxxxxx> wrote:
> On Thu, Dec 15, 2011 at 18:10, Robert James <srobertjames@xxxxxxxxx> wrote:
>> How do I do the equivalent of an ANY() or ALL() in PG Aggregate SQL?
>
> Note that in many cases, writing an EXISTS(SELECT ...) or NOT
> EXISTS(...) subquery is faster, since the planner can often optimize
> those to a single index access -- whereas an aggregate function would
> necessarily need to walk through and evaluate all potential rows.
>

Really? The planner can't tell that, for instance, BOOL_AND (false, *)
is automatically false?

(BTW Thanks for the great responses everyone! On this and other posts
on this list)

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


[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