SQL Encoding of Filters on Nested Attributes
Description
Environment
Activity
Stefano, Jira will not let me add a fix version for 14.6 as it has been archived. Please close this issue when ares Jenkins has passed. Thanks again for your efforts in producing the solid improvement! Kind regards, Ben.
Ben, I've prepared backports for GeoTools 16.x, 15.x and 14.x (and of course backports for the corresponding GeoServer PR as well).
I will close this issue as soon as the backports have been merged... which I expect will require some time, this change not being a mere bug fix.
Build passed on Travis CI. I squashed the GeoServer PR locally and tested with a full build and app-schema online tests against postgis. All good, so I pushed the squashed changes onto GeoServer master in https://github.com/geoserver/geoserver/commit/7813a85ff8c0c8c646c79ad315ed976870e81959.
I have restarted the Travis CI build for GeoServer PR 1847.
GeoTools PR merged on master:
https://github.com/geotools/geotools/pull/1319
I will re-run Travis CI for the GeoServer PR when geotools-master build has completed as Travis CI will need the GeoTools artifacts with PR 1319 to pass:
https://github.com/geoserver/geoserver/pull/1847
Stefano, I will resolve but not close this issue; please prepare backports as you see fit. I think we are all pretty happy with these changes.
Currently, filters operating on nested attributes (i.e. attributes of features that are joined to the queried type via feature chaining) are evaluated in memory, after all available features have been loaded.
Translating these filters to SQL and thus doing the filtering directly in the database backend could bring significant performance improvements, especially when the total number of features in the database is high, but only a few of them would satisfy the filter.
Related mailing list discussion:
http://osgeo-org.1560.x6.nabble.com/App-Schema-Encoding-of-Filters-on-Nested-Attributes-td5285165.html