Bug report #11348
Add PostGIS layers is too slow on connecting to a database
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Harry Clarke | ||
Category: | Data Provider/PostGIS | ||
Affected QGIS version: | 2.4.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19639 |
Description
Add PostGIS layers is too slow. The reason is that when connecting to the database, every table and view is read along with all the details. This is not necessary. Instead QGIS should first identify the Schemas that are present within the database, as this is the first screen displayed to the user. Tables and Views should only be read if the Schema is selected, but only the name of the table or view. When the table or view is selected, then the additional information should be read.
This is being reported as a bug rather than a feature request, as it is a usability issue.
History
#1 Updated by Mathieu Bossaert about 10 years ago
Good morning Harry,
did you try to check the "do not resolve geometry type..." option in the database connection settings ?
It inscrease a lot the listing of all views and tables.
Mathieu
#2 Updated by Harry Clarke about 10 years ago
Morning Mathieu,
I am not sure exactly which option you are referring to.
I did try ticking the option "Don't resolve type of unrestricted columns (GEOMOTERY)", which is a lot quicker, but that only shows half of the schemas, and not the schema I am interested in, so not very helpful.
Harry
#3 Updated by Harrissou Santanna about 10 years ago
Hi,
Harry, It doesn't solve the issue you are reporting (and this really needs to be fixed) but you should try DB Manager (which is a core plugin of QGIS).
#4 Updated by Harry Clarke about 10 years ago
Hi Harrissou,
Unfortunately DB Manager is unable to add the layer I am interested in, see issue #11317. Because the aggregated view doesn't have a primary key set. Hence it is only possible in the Add PstGIS layers command, where the primary key can be set to some column that happens to be unique.
#5 Updated by Jürgen Fischer about 10 years ago
- Category set to Data Provider/PostGIS
#6 Updated by Giovanni Manghi over 7 years ago
- Regression? set to No
- Easy fix? set to No
#7 Updated by Harry Clarke over 6 years ago
- Status changed from Open to Closed
- Assignee set to Harry Clarke
Checked and the issue now seems to be resolved in QGIS v3
#8 Updated by Giovanni Manghi over 6 years ago
- Resolution set to fixed/implemented
- Description updated (diff)