[postgis-users] PostGIS Raster efficient enough to get height given coords from a large DEM?

Bborie Park bkpark at ucdavis.edu
Fri Dec 2 11:37:35 PST 2011


On 12/02/2011 11:17 AM, Stefan Keller wrote:
> Hi Bborie
>
> 2011/12/2 Bborie Park wrote:
>> The question of tile size comes because the serialized raster data is
>> stored in TOAST, which may compress the data.
>
> Good point.
>
> I know that a heap table is 8kb (unless changed in postgresql.conf)
> and I assume that one wants to avoid that tuples have to use TOAST.
> Are there any rules of thumb on how to estimate the tile size (in bytes)?
>
> Yours, Stefan

Well, it basically boils down to "the bigger the tile size, the slower 
the detoasting".  The problem with trying to keep things under 8KB is 
that if you have a multi-band raster where there are more than one pixel 
type, things get very ugly quickly.

Generally speaking, the smaller the tile size, the faster the operation. 
  In my testing of my rasters, 200x200 is slower than 100x100 which is 
slower than 50x50.  The smaller tile size results in more rows in the 
table BUT the performance dramatically increases.  I can't remember of 
the top of my head but the performance gain was linear or better.

-bborie

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list