-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postgis View Layers with OID as primary key are loading very slow #11915
Comments
Author Name: Giovanni Manghi (@gioman) Hi, what version of qgis are you using? platform? |
Author Name: Jürgen Fischer (@jef-n) Replying to "hdus":/issues/show/1855:
Does "loading" mean only "inserting" or "displaying"? Inserting the view to the project can be slow, while QGIS tries to figure out what the primary key column is. Once that's done displaying should be quick. Saving the project and reloading it should be also quick as QGIS saves the key column it found. If you add the layer using python you can also specify the key column using key=column and QGIS will just verify that it's unique. See also #11595 |
Author Name: Horst Düster (@hdus) Replying to [comment:3 jef]:
Loading means inserting. I took a look at the comments of #11595 and there gjm talked about an option to select the primary key column by the user when he is loading the postgis layer. Maybe it is possible to make some changes of the Postgis loader UI in this direction? |
Author Name: Horst Düster (@hdus) Replying to [comment:5 jef]: Thank you for the patch. Yes in this way it works fine for me! |
Author Name: Horst Düster (@hdus)
Original Redmine Issue: 1855
Redmine category:data_provider
Assignee: Jürgen Fischer
I want to load a postgis view layer defined in a way that the OID represents the primary key of the view query result. No real primary key is defined in the source tables. When I query this view from psql it gives me the query result very fast. When I load this layer into QGIS it needs a very long time, more than 1 minute, to load this layer.
The text was updated successfully, but these errors were encountered: