Hi Richard Thanks for the suggestion. They are plain filters and I tried indexing every table, but unfortunately it has made no noticeable difference.
Regards, Peter On Thu, 13 Aug 2020 at 15:35, Richard Duivenvoorde <rdmaili...@duif.net> wrote: > On 8/13/20 3:57 PM, Peter Cornelissen wrote: > > Hi > > > > I am using a Geopackage with about 15 tables (a mixture of lines, > polygons and points), but each of these tables are > > used 40 or 50 times with filters as many of the elements are used on > multiple layers. > > However, I am now finding that as soon as I add a new layer QGIS slows > down > > and it is taking 60 seconds or more to do almost any action that involves > > redrawing (zoom in/out/ pan etc) or even moving a layer within the layers > > panel. If I save the project, close down QGIS and restart, it is fine > again > > until the next time. > > > > Any suggestions? > > > > Thanks, Peter > > Looking at the attributes which are used in the filters, add 'indexes' too > the tables in the Geopackage? > > In QGIS you can do that by creating a connection to the gpkg with DataBase > Manager and then: > 'edit table' > tab indexes, > add index > > A geopackage is a sqlite database, so if you have some sql-client > (DB-manager, DB-browser) you can fire the create index query there: > CREATE INDEX "foo_index" ON "mygeopackage" ("foo_column") > > Note that these are plain indexes, no spatial ones. > IF your filters are spatial filters, then off course you need spatial > indexes. > > HTH > > Regards, > > Richard Duivenvoorde >
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user