[postgis-users] Function OVERLAPS() versus &&

James G Wilkinson jgw at alpinegeophysics.com
Fri Jan 14 10:04:54 PST 2005


Here is an example query:

CREATE TALBE us_pophu_prj AS
                SELECT a.gid, b.gid AS sec_gid, 
GEOMUNION(a.the_geom,b.the_geom)
                FROM us_pophu a, us_tribes b
                WHERE a.the_geom && b.the_geom AND 
OVERLAPS(a.the_geom,b.the_geom);

My questions are as follows:

(1) Are the use of the '&&' clause and the function OVERLAPS() redundant?
(2) I know that '&&' will use the GiST index, but does the function 
OVERLAPS()
use the GiST index?
(3) Is the query I pose the most efficient way to union the two coverages?

Regards,

Jim



More information about the postgis-users mailing list