I have a database with more than 110 million records (points), in the geopackage format it is 11 gigabytes and in the Geoparquet format it is 2 gigabytes. Viewing takes more than 5 minutes.
I need access to work with this base in QGIS, but it is very heavy. I limited the display by scale (1:1 to 1:10,000) and I would like to know if there is a way to limit the number of elements displayed on the screen, that is, if I zoom in, zoom out or pan, the number of points maximum displayed will be a predetermined value.
Is this possible? Are there other ways to manipulate this data? I tried to create a spatial index, but nothing happened in both formats. An example of use is: quantifying the total number of points within polygons drawn on the screen ( aggregate(layer:='domicilios',aggregate:='count',expression:="NV_GEO_COO", filter:=intersects($geometry, geometry(@parent))))