Feature request #2460
Use estimated metadata for PostGIS layers
|Pull Request or Patch supplied:||Resolution:||fixed|
|Easy fix?:||No||Copied to github as #:||12520|
PostGIS layers with millions of features take quite some time to be added to the map canvas because of table feature counts, layer extents and geometry type determination.
Attached is a patch that adds an option to speed up the following PostGIS layer operations:
- The row count is determined from table statistics obtained from running the PostgreSQL table analyse function.
- Table extents are always determined with the estimated_extent PostGIS function, even if a layer filter is applied.
- If the table geometry type is unknown and is not exclusively taken from the geometry_columns table, then it is determined from the first 100 non-null geometry rows in the table. This applies to both the PostGIS Provider and the Add PostGIS Layers dialog.