My frame of reference is:
Does QGIS automatically use spatialite spatial indexes?
This explain that QGIS uses
QgsSpatiaLiteFeatureIterator for Spatialite Data Provider
Spatial indexes in GeoPackage files This explain the use of Query that is utilizing r-tree index with sub-query:
This last one explain that It's possible in QGIS3 to create spatial index for Geopackage. You can click "Create Spatial index" from the Layer Properties Dialog and that's it.
My doubt when reading all this, is what is the current state of the use of spatial index within a geopackage?.
Because I can use the DBmanager to create non-spatial indexes within a geopackage per column, and they are visible inside the DBmanager information window, however when using "Create Spatial index from the Layer Properties" QGIS seems to create the index -very fast by the way-, but the geopackage is not altered with any new table related to the layer.
And I can not see information in the DBmanager that the index was created.
In fact, when creating an index within the geopackage, only the option to create non-spatial indexes is possible, the option to create a spatial index appears gray/disabled.
When one creates the index from the properties of the layer, QGIS saves it inside the project but not inside the geopackage? Is this how it works?
Why is it not possible to create spatial indexes for geopackages using the DBmanager?
I'm just trying to understand the operation of the gpkg within QGIS
use QGIS 3.2.3
Data: geopackage with 2 tables
table to nonspatial: 4 million records
spatial b table: polygons approx 40k elements