[postgis-devel] function difference(geometry, geometry) work very slowly!

luke.78 at libero.it luke.78 at libero.it
Wed Jun 18 03:02:27 PDT 2008


---------- Initial Header -----------

>From : "luke.78" luke.78 at libero.it
To : "postgis-devel" postgis-devel at postgis.refractions.net
Cc :
Date : Wed, 18 Jun 2008 11:52:39 +0200
Subject : Re: [postgis-devel] function difference(geometry,geometry) work very slowly!






Hi,
- The version of postgresql is 8.1.9
postgis 1.1.6 GEOS 3.0.0rc4
- One of two geometry is very big!
- I am sure that the geometries intersects

this is the code

...

SELECT Q.THE_GEOM INTO GEOM_ASSEGNATO
FROM GEO_QUADRANTI Q
WHERE Q.ID_QUAD=0;
...

FOR CUR IN
SELECT THE_GEOM
FROM MY_TABLE
WHERE
THE_GEOM IS NOT NULL
LOOP

BEGIN
GEOM_PERCORSO_APPO:=DIFFERENCE(GEOM_ASSEGNATO,CUR.THE_GEOM);
EXCEPTION
WHEN OTHERS THEN
NULL
END;

GEOM_ASSEGNATO := GEOM_PERCORSO_APPO;

END LOOP;

...

thanks a lot1

> Send us a patched faster version? :) Pass it smaller geometries?
> Ensure that your query doesn't send it geometries that don't
> intersect?
>
> Without seeing your full SQL, there is little we can provide in
> assistance beyond those general comments.
>
> P
>
> On Tue, Jun 17, 2008 at 11:25 AM, luke.78 at libero.it <luke.78 at libero.it> wrote:
> > Hi,
> > In my pgsql procedure, i use the function
> >
> > geometryDiff := difference(geometry1,geometry2);
> >
> > but this function is very slow!!!
> > What can I do to
> > speed this function?
> >
> >
> > Thanks in advance!
> > Luke
> >
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-devel
> >
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>





More information about the postgis-devel mailing list