I have a query that places points in polygons:
insert into results (
                select a.point_id, b.polygon_id
                from  points a, polygons b
                where 
st_contains(ST_GeomFromWKB(ST_AsBinary(b.geog),4326),ST_GeomFromWKB(ST_AsBinary(a.geog),4326))
 = 't'
);
There are ~1M points and ~300k polygons. There are geo indexes on the geog 
columns of both tables.
What changes would make the query faster?

Thank you very much.

Michael


The information contained in this transmission is to be considered CONFIDENTIAL 
and PROPRIETARY to Consortium Health Plans, Inc. and intended for the use of 
the Individual or Entity named above.  If the reader of this message is not the 
Intended Recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is Strictly Prohibited.  If you 
have received this transmission in error, please notify us immediately by 
telephone at 410-772-2900 or return email to sender immediately.  Thank You.
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to