[postgis-users] POSTGIS 2.0 Test if a Geometry Exists

Christophe Vergon christophevergon-girtec at orange.fr
Mon Feb 18 01:44:00 PST 2013


Hi,

I want to test if a Geometry is already exists in a table, what is the 
faster Solution ?

I think to use this :

SELECT the_geom FROM schemaname.mytable WHERE ST_Equals(the_geom, geomtoadd);

When it returns 0 rows the geometry does not exist, but with a big table it will be slow ?

Is there a way do it faster ? (a sort of insert into if not exists ) ?

Thanks in advance.

Christophe







More information about the postgis-users mailing list