[QGIS-trac] [Quantum GIS] #2460: Use estimated metadata for PostGIS layers

Quantum GIS qgis at qgis.org
Sun Feb 21 20:30:19 EST 2010


#2460: Use estimated metadata for PostGIS layers
------------------------------------------------+---------------------------
   Reporter:  jpalmer                           |              Owner:  nobody       
       Type:  enhancement                       |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.5.0
  Component:  Data Provider                     |            Version:  HEAD         
   Keywords:  postgis, postgresql, speed        |   Platform_version:               
   Platform:  All                               |           Must_fix:  No           
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 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

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2460>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list