Bug report #582

Use the estimateExtents function for PostGIS and PostgreSQL 8

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

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Data Provider
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10641

Description

Currently the POSTGIS data provider use the "extents" function to determine the layers spatial extents. This can take time on very large tables. Starting from PostgreSQL 8.0 the column's statistics are stored. This means that the geometry extents can be cached during statistic gathering. The POSTGIS team have added a function that returns the estimated extents "estimateExtents".

This function should be used by the data provider when the server version is greater than 8.0.

The inconvenience of not having the precise extent does not out weight the need for quick data provider creation. If it becomes an issue for the user the database admin should schedule regular table statistics updates.

Associated revisions

Revision 9dbe4f57
Added by Jürgen Fischer over 15 years ago

postgres provider update
- track open cursors and commit transaction whenever no open cursors are left
- close cursor after immediately after feature retrieval (releases locks earlier)
- wrap postgres calls in Conn class
- introduce Result class to handle PQclear mostly transparently (fixes minor leaks)
- remove executeDbCommand method (duplicate of PQexecNR)
- introduce support for estimate_extents (fixes #582)
- introduce support for enum types (fixes #1210)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9183 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision b9452c2d
Added by Jürgen Fischer over 15 years ago

postgres provider update
- track open cursors and commit transaction whenever no open cursors are left
- close cursor after immediately after feature retrieval (releases locks earlier)
- wrap postgres calls in Conn class
- introduce Result class to handle PQclear mostly transparently (fixes minor leaks)
- remove executeDbCommand method (duplicate of PQexecNR)
- introduce support for estimate_extents (fixes #582)
- introduce support for enum types (fixes #1210)

git-svn-id: http://svn.osgeo.org/qgis/trunk@9183 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Aaron Racicot - over 16 years ago

  • Status changed from Open to In Progress

#2 Updated by Jürgen Fischer almost 16 years ago

  • Status changed from In Progress to Open

#3 Updated by Jürgen Fischer over 15 years ago

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

added in b9452c2d (SVN r9184)

#4 Updated by Anonymous over 14 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF