Feature request #2460

Use estimated metadata for PostGIS layers

Added by Jeremy Palmer about 14 years ago. Updated about 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Data Provider
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12520

Description

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.

This patch potential resolves the following tickets: #2394, #581

postgis_use_estimated_metadata.diff Magnifier (17 KB) Jeremy Palmer, 2010-03-08 04:39 PM

History

#1 Updated by Jürgen Fischer about 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

slightly modified applied in 4852ceb1 (SVN r13045). Thanks Jeremy.

#2 Updated by Jürgen Fischer about 14 years ago

take 2 on b4010ce2 (SVN r13222).

Also available in: Atom PDF