[Qgis-developer] PostGIS manager

Jeremy Palmer JPalmer at linz.govt.nz
Wed Jan 14 17:41:21 EST 2009

Hi Martin,

I've just had a look at your PostGIS manager and I'm very impressed. A couple of things I thing could use improvement though:

1) When the plug-in first loads and connects to the DB, it can take along time for the GUI to yield if the DB has hundreds of relations. Under this scenario the GUI just hangs and gives you no indication as to what's going on. Maybe a status dialog (i.e. "connecting to database on server") and an hourglass cursor should be implemented.

2) When you select PostGIS tables in the "Database view" that are located in a schema that is not in the user's schema search_path I get the following error: "Unable to access relation" .....ERROR relation "table does not exist. SQL select * from table limit 1"

3) Currently I have a lot of database tables that have a large number of rows i.e. 100million+. When you first select a table from the Database view tree it seems to complete a full row count and then fetch all of the data for the table and preview views. From my observation any table that has more than 500,000 rows seems to take a long period of time to load. There are three things I would recommend implementing to improve large table support:

        i.   Do not complete a row count automatically for relations. Instead
           just display the estimated row count, then allow the user to
           complete a full row count on the table if required. See
           pgAdminIII for an example.

        ii.  Do not populate the rows in the "Table" tab unless it is
           active. If the Table tab is active then rows are populated in the
           grid using a scrollable cursor that fetches batches of rows as
           the user moves up and down table. Another option is to just limit
           the number of rows to a user defined amount. Again see pgAdminIII
           for an example.

        iii. Do not to render the spatial map preview, unless the "Preview"
           tab is active. If the Preview tab is active incrementally
           render the features (using parameters as defined in the QGIS
           Rendering Options). Also allow the user to cancel the render
           process with the "ESC" key

4) Under the relation metadata tab it would be nice to display the spatial extents of the layer in the PostGIS section. Maybe this should only be implemented for PostgreSQL server versions greater than 8.0 so the fast estimated_extent() SQL function can be used. Also just displaying the SRID is not very user friendly. It would be great if the user could click on the SRID to get the spatial reference system metadata i.e. name, parameters, datum etc.

5) Running SQL queries in the "SQL Window" that return more than 5000 rows is very slow. From my observation it seems the slow part is not returning the result from the database but loading the data into the results grid. This seems counterintuitive considering a similar sort of fetch and display occurs in the relation "Table" tab grid which is orders of magnitude faster.

6) It would be nice to have the query run-time displayed in the SQL window.

FYI I've been running PostGIS manager v0.4.3 with OSGeo4W QGIS v1.0 under WinXP SP2.

If you don't have time maybe I could have a look at fixing some these things :)


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-developer mailing list