[postgis-devel] ST_Envelope & spatial index

dustymugs dustymugs at gmail.com
Tue Mar 13 15:50:04 PDT 2012


On 03/13/2012 03:46 PM, Sandro Santilli wrote:
> On Tue, Mar 13, 2012 at 11:07:24PM +0100, Andrea Peri wrote:
>
>> select ST_Extent(ST_Envelope(rast)) from tabella;
>>
>> But it take many time, too time I guess.
>
> I think it'll fully decompress each value.
> If that's the case it could be optimized by only fetching
> the header instead.
>

We only grab the raster header for the ST_ConvexHull(raster) call done 
in ST_Envelope(raster).

I think the problem boils down to the fact that a sequential scan is 
required for a blanket call to ST_Extent.

-bborie



More information about the postgis-devel mailing list