[postgis-users] performace question

geniaux at avignon.inra.fr geniaux at avignon.inra.fr
Wed Apr 1 08:20:46 PDT 2009


Selon Ivan Mincik <ivan.mincik at gmail.com>:

1) Create a spatial index
2) make VACUUM on that table.
3) use "SELECT count(obce.gid) FROM obce,cr WHERE  obce.the_geom && cr.the_geom
and ST_Touches(obce.the_geom,cr.the_geom);"

> On Wednesday 01 April 2009, Martin Landa wrote:
> > Hi,
> >
> > I am beginning with PostGIS and I wonder about performance, e.g.
> > having layer 'regions' = 'obce' (polygon) and boundary of CZ = 'cr'
> > (polygon).
> >
> > SELECT count(obce.gid) FROM obce;
> >  count
> > -------
> >   6361
> > (1 row)
> >
> > SELECT count(obce.gid) FROM obce,cr WHERE ST_Touches(obce.the_geom,
> > cr.the_geom);
> >  count
> > -------
> >    285
> > (1 row)
> >
> > Time: 258271.730 ms
> >
> > It seems to be quite long time, any hits about configuration of
> > PostgreSQL, query optimalization?
> Have You tried to make VACUUM on that table ?
> >
> > PostgreSQL 8.1.15,  1.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
> >
> > Thanks in advance, Martin
> >
>
>
> _______________________________________________
> 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