[postgis-users] POSTGIS 2.0 Test if a Geometry Exists
Stefano Iacovella
stefano.iacovella at gmail.com
Mon Feb 18 02:19:41 PST 2013
Hi Christophe,
I would add a search for features at least intersecting with your candidate
geometry, to avoid testing for equality on all records.
Kind Regards,
Stefano
Il giorno 18/feb/2013 10:46, "Christophe Vergon" <
christophevergon-girtec at orange.fr> ha scritto:
> 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
>
>
>
>
>
> ______________________________**_________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-**bin/mailman/listinfo/postgis-**users<http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130218/c2265922/attachment.html>
More information about the postgis-users
mailing list