[postgis-users] Query re boolean results and efficiency
L Bogert-OBrien
dlawbob at ncf.ca
Sun Aug 22 12:55:26 PDT 2010
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
More information about the postgis-users
mailing list