Details
Description
The current postgis datastore allows usage of the estimated extents function to quickly compute bounds of multi-million row datasets quickly by fast inspection of the index optimizer statistics.
The NG one does not, and in order to support it, we'll need to make some API changes as the estimated extent is not a query that is applied on a table, but look like:
select estimated_extent('tableName', 'columnName')
The oracle plugin needs this to use the SDO_TUNE fast bbox computations as well, but with a twist, in that case the function always returns a correct result provided the data is in a projected CS (so it's always a good choice with the right data set, it's not a matter of user setup).
In both cases it seems the dialect class should be modified to allow the specific dialect to completely take over the computation of extents for a given set of geometries.
Issue Links
- is related to
-
UDIG-1659
Relaxing requirement to know bounds
-
{code}
ReferencedEnvelope getOptimizedBounds(String schema, SimpleFeatureType featureType, Connection cx)
{code}
the method will perform an optimized computation if possible, based on all geometric columns, or return null if the optimized computation is not possible.
The passed down featureType might have less geoemtric columns than the table if the user asked for a bounds computation on a subset of columns. The eventual type and column metadata will be preserved by JDBCDataStore in that case (so that, for example, the native SRID is guaranteed to be there in any case).