ImageMosaic performs full scan aggregation on heterogenous mosaics

Description

In order to best handle heterogeneous CRS mosaics a query is run that compute all unique values of the crs column. However, for the task at hand, a simpler, faster query can be used that can provide the same desired output (checking if a particular CRS is available).
The difference in performance can be very significant, if the mosaic index has a large amount of entries (e..g, tens of millions)

Environment

None
Fixed

Assignee

Andrea Aime

Reporter

Andrea Aime