POSTGIS vs Shapefile mapserver optimization

Gregor Mosheh gregor at HOSTGIS.COM
Tue Dec 12 11:30:42 EST 2006


> Ask for the details you need to help me if you need some more ...

Actually, it's usually the other way around. ;)


> What is the better way to get mapserver generating map faster !
> Is POSTGIS optimizing the way that mapserver build the map ?

Typically, shapefiles are faster; or at least that's what I've
consistently been told is true for the majority of cases.

If your PostGIS performance is slow, make sure you have indexes! Nothing
affects performance as much as indexes, and they're an easy thing to
forget to do. Ensure that there's a GiST index on your geometry column, as
well as on on your oid column. If the indexes are missing, generate them
as follows:

   create index tablename_the_geom on tablename (the_geom) using gist;
   create index tablename_oid on tablename (oid);
   analyze tablename;



More information about the mapserver-users mailing list