[Qgis-user] Postgis speed with QGIS

John Abraham jabraham at ucalgary.ca
Wed Jun 9 21:28:11 PDT 2010


Mine are parcel databases (cadastral) for urban regions.  The one for San Diego, for instance, has 800,000 rows.

Geometries are mostly polygons but some multipolygons.  Will this cause a problem with the "use estimated metadata" option?

If I look at the server while I'm waiting for QGIS to respond, it's usually doing a "fetch forward 200" at the time.  

--
John 


On 2010-06-09, at 7:09 PM, Chris Crook wrote:

> 
> Hi John
> 
> What size of database are you working with.  Assuming that you have built the indexes and analyzed the tables so that they are being used for the queries PostgreSQL is fine for small databases.  
> 
> For larger ones (say > 10,000 records) there are some Qgis implementation issues that can make the response very slow, at least for initially loading the layers.  These result from queries Qgis issues which result in full table scans (for example counting the number of records, determining that all the geometries are of the same type, determining the geographic extents of the layer). If this is your problem you can use the pgadmin server status tool to see these queries executing.
> 
> With version 1.5 there is an option to "Use estimated metadata" when you are creating the Postgres connection.  This avoids some of these time consuming queries, at the expense of not having accurate information on extents - they are taken from the statistics generated when the table is analyzed.  With this option we are getting good response even on a national scale database of millions of records.
> 
> Cheers
> Chris
> 
> -----Original Message-----
> From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of John Abraham
> Sent: Thursday, 10 June 2010 10:56 a.m.
> To: qgis-user at lists.osgeo.org
> Subject: [Qgis-user] Postgis speed with QGIS
> 
> Loading and manipulating a PostGIS layer in QGIS is quite slow right now.  I have GIST indexes.  I'm running both QGIS and PostGIS on the same machine.  I'm currently blaming PostgreSQL and am currently exploring configuration and hardware options to make my PostgreSQL installation faster.
> 
> Any suggestions on PostgreSQL configuration?  Anything else I should try?  
> 
> What are others' experiences?  Is there any hope for making my PostGIS layers as fast as my shape file layers?
> 
> --
> John Abraham
> jabraham at ucalgary.ca_______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> ______________________________________________________________________________________________________
> 
> This message contains information, which is confidential and may be subject to legal privilege. 
> If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.
> If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message.
> LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.
> 
> Thank you.
> ______________________________________________________________________________________________________
> 
> 




More information about the Qgis-user mailing list