Use the estimateExtents function for PostGIS and PostgreSQL 8
|Reported by:||jpalmer||Owned by:||jef|
|Must Fix for Release:||No||Platform:||All|
|Platform Version:||Awaiting user input:||no|
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.