[postgis-devel] Is postgres - postgis able to support estimated metadata for views?

Sandro Santilli strk at keybit.net
Sat Sep 12 04:12:06 PDT 2015


On Fri, Sep 11, 2015 at 08:00:42PM +0000, HAUBOURG wrote:

> QGIS / qgis server clients require to extract metadatas such as estimated extent, fields and data types, primary keys and geometry types. This is rocket fast on tables with metadata's updated with autovacuum.
> 
> Views do not support such metadatas, then those information require to scan fields, and geometries. Loading layers from views starts to be a severe bottleneck here with increasing spatial resolution of datasets.
> 
> QGIS desktop slows down when loading views only, so user have to wait 10 -20 seconds once only for medium size projects, when QGIS server seems to query those metadata on each tile query, and is fairly unusable woth such views. Mapserver does not seem to need those information, and runs smoothly.
> 
> My question now:
> Is there any technical option available in Postgres / Postgis architecture to head forward handling views metadata ?
> If possible, could you give me some tips on how to have it land in the project.
> I should be able to fund developers on that - no free work asked her !

You should check but I believe that mapserver doesn't query for
metadata at all. I'd guess what you're reporting is more a problem
with QGIS than with PostGIS.

Views in PostGIS can very well expose geometry type and SRID
metadata (they are encoded in the geometry typmod).
As for extent, a tile server should know about that upfront,
why would it need to determine it ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list