-3

I want to know, where this view is actually stored in the server, and how does it interact with the database.

I saw that the size of the database is increasing when GeoServer try to serve/create some tiles and then it decrease again, I guess that is cause some index that its using from behind.

closed as unclear what you're asking by user30184, underdark Mar 21 '16 at 21:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    You should add more information about how you're using GeoServer with Postgres views. Also, why is there a shapefile tag? – Richard Law Mar 21 '16 at 20:04
2

Table views in PostgreSQL are not real tables, but nevertheless behave like them when it comes to using a SELECT statement. Typically you'd use them to combine multiple tables, restricting access to maybe a subset of columns from each, and only having one point of contact—which is great for a GeoServer data source. Each time you query a view, the underlying query that the view consists of is also executed, so you want to make sure you have appropriate indexes in place.

The data is not stored twice: the original tables obviously take up space, but the view itself is essentially just instructions. (There are also materialised views, for which this doesn't hold.)

You haven't included much information about how you're using GeoServer (as a tile server?). Tiles will probably be cached by default, which uses space on disk. But at the database level, the view will not be noticeable in terms of additional disk space, unless your use of a view necessitates a really big index that you would not otherwise need.

  • The data I am working with is a table with 55k rows and with 30 columns, with multipolygon geometries and data associated. I use GeoServer as a tile server, just WSM, without caching it with geowebcache or something like that at the moment. And the shapefile tag comes, because what I really want to know, is what does have better performance, getting data from postgis queries or from a shapefile, and for that I wanted to know how it was working in the inside. – fofipl Mar 22 '16 at 9:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.