Bug report #17502
QGIS eats too much data with relation reference widget
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Hugo Mercier | ||
Category: | Edit widget | ||
Affected QGIS version: | 2.18.14 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 25399 |
Description
When using large databases in QGIS 2.18.14, I discovered QGIS was fetching 3 times the referenced table objects.
How to reproduce:
- create a DB with two tables, on reference table and one referencing with a FK pointing to the reference table.
- configure the relation in QGIS and add a relation reference widget on the FK field
(use only one readonly line and point on map tool activated)
- create a referencing object > its fast
- reopen the object form > it's slow and querying three times the reference dataset, including all fields when only id, geom and tooltip fields should be necessary.
Anyway, for QGIS 3 fixing that will not solve totally the real issue that is that loading all the reference layer is overkill. asynchroneous loading is being made by Matthias in QGIS 3, but only loading in the current extent, and only fetching the required fields (id, geom, PK, display expression result) would be very nice.
History
#1 Updated by Hugo Mercier almost 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|5fb970abbe944b879e018e7c18247377aac8988b.