Optimizing PostGIS.

Luca Manganelli luca76 at GMAIL.COM
Wed Apr 12 05:45:48 EDT 2006


Hi,

I'm trying to optimizie a postgis table.

I did "shp2pgsql" command to convert a large shapefile (17 MB, over
5000 features) then I imported it into postgres 8.1.
I created spatial index and I did VACUUM ANALYZE on that table.
I followed the steps in "Performance tips" on Postgis Documentation at
http://postgis.refractions.net/docs/ch05.html (expecially in 5.2 and
5.3).

BUT, in my mapserver the shapefile drawn at max extent is somewhat
50%-100% faster
than Postgis. That performance gain reduces to a 10%-30% in lower scales.
If I do a point query on Postgis table, it is not much faster (but the
performances are often equals!!)...

Any idea?

--
"Work only as many hours as you can be productive and only as many hours as
 you can sustain."  - Kent Beck, in "Extreme Programming Explained"

http://www.trapanator.com/blog



More information about the mapserver-users mailing list