In prior releases of QGIS, aggregate expressions did not pass the parent object parameters as static variables, preventing them from being executed by the data provider (e.g. PostgreSQL). This change will result in significant performance increases for a number of aggregate expressions. For example, in the aggregate expression:
IF(aggregate(layer:='parks',aggregate:='count', expression:= 't_id', filter:=intersects( $geometry, geometry(@parent))) < 1, 'FALSE', 'TRUE')
The execution of the intersects( $geometry, geometry(@parent))
filter will be performed on the data provider directly.
This feature was funded by Amt für Geoinformation Kanton Schaffhausen
This feature was developed by David Signer, OPENGIS.ch