GeoServer – Performance of Shapefile vs PostGIS

geoserverperformancepostgisshapefile

I'm going to build a web application, which will render around ten maps using GeoServer. I will be also changing the attribute data in the application for some layers.

What is the recommended choice for performance and deployment: A map rendered from GeoServer using Shapefile or PostGIS database ? ( or they don't really matter)

I don't deal with any spatial query.

Best Answer

PostGIS. Geoserver documentation has the following comment:

"Shapefiles are a very common format for geospatial data. But if you are running GeoServer in a production environment, it is better to use a spatial database such as PostGIS. This is essential if doing transactions (WFS-T). Most spatial databases provide shapefile conversion tools. Although there are many options for spatial databases (see the section on Working with Databases), PostGIS is recommended. Oracle, DB2, and ArcSDE are also supported."

This isn't the whole story; even if you don't care about WFS, everything from native-sorting to the ability to create & publish PgSQL views, query performance, data security, storage...just use PostGIS.