[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] Query re boolean results and efficiency
From:       L Bogert-OBrien <dlawbob () ncf ! ca>
Date:       2010-08-22 19:55:26
Message-ID: 10b27e10f0ec.10f0ec10b27e () ncf ! ca
[Download RAW message or body]

In a previous posting, I saw the following suggestion:
> 
> ...you could do something like this:
> select count(*)
>        from 
>           public.table1 as a,
>            public._sample_extent as b
>        where 
>          ST_Intersects(a.geom,b.geom)=true
> 

I was wondering, doesn't 
"WHERE ST_Intersects(a.geom,b.geom)"
have the same output as
"WHERE ST_Intersects(a.geom,b.geom)=true"
and wouldn't it actually be more real time efficient to do the first
one, since you don't have to do the extra check with whether it is equal
to true or not?  Or is the PostgreSQL compiler smart enough to make the
two exactly the same when it comes to efficiency?

Regards,

Loretta
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic