[Qgis-developer] Re: PostGIS provider estimated extent

Jeremy Palmer JPalmer at linz.govt.nz
Tue Mar 30 20:19:36 EDT 2010


Hi Jürgen,

> Yes.  That was the problem.  Trying to use estimates without actually having
> any caused the query to fail.  That also invalidates all open cursors.  The
> idea was that either all or no tables have estimates.   In the latter case the
> very first query would fail and subsequent queries wouldn't try to use
> estimates.

Sorry for the late reply!

The use of the estimated_extent function is very important for me as I'm dealing with large PostGIS datasets. The way the postgis provider is implemented at the moment prevents the use of estimated_extent once it has failed once. This means that after I have looked at a table that hasn't been analysed or is a view, then every other table on the same connection that I use after that is hopelessly slow, because it no longer uses the estimated extents function. The only way I can reset this is to restart Qgis.

I can understand that we need to rollback the transaction when the estimated extents function has failed, but I can't see a reason not to try to use it for other tables on the same connection.

Could I suggest we keep the rollback on the cursor if we get an error, but to still allow subsequent calls of the estimated_extent functions on the connection even after a failure?

I have attached a patch that implements my suggestion, and if you agree I will create a ticket :)

Kind regards,
Jeremy

______________________________________________________________________________________________________

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.
______________________________________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postgresprovider.diff
Type: application/octet-stream
Size: 2196 bytes
Desc: postgresprovider.diff
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100331/7fcf7596/postgresprovider-0001.obj


More information about the Qgis-developer mailing list