[postgis-users] Improve perfomanse

Ariel Tavella buenasalud at ubbi.com
Mon Nov 28 07:00:12 PST 2005


proba

SELECT *
FROM metadata
WHERE another object && geom AND
'MULTIPOLIGON(((another object)))'~ geom AND
        CONTAINS('MULTIPOLIGON(((another object)))', geom);


Ariel Tavella


----- Original Message ----- 
From: "Илья Конюхов" <ilyakon at mail.ru>
To: <postgis-users at postgis.refractions.net>
Sent: Monday, November 28, 2005 10:13 AM
Subject: [postgis-users] Improve perfomanse


> There is a table:
>
> CREATE TABLE metadata ( ID int4 );
> SELECT AddGeometryColumn('','metadata','geom',-1,'MULTIPOLYGON',2);
> CREATE INDEX idx_metrics ON metadata USING GIST (geom GIST_GEOMETRY_OPS);
>
> There are 300000 objects in this table and each object has only four 
> points.
> I want to find all objects within a another object. The another object has 
> 11538 points.
>
> SQL:
> SELECT *
> FROM metadata
> WHERE 'MULTIPOLIGON(((another object)))'~ geom AND
>        CONTAINS('MULTIPOLIGON(((another object)))', geom);
>
> Run time: 3 hours!!! P4 2.4 GHz; 1Gb RAM;
>
> Are there any methods to improve perfomanse in that case?
>
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> 





More information about the postgis-users mailing list