[postgis-users] r tree bulk loading algorithm

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Fri Jan 28 05:47:39 PST 2011


On 26/01/11 09:09, Daniar Achakeyev wrote:

> Hi,
>
> I am new to postgis. I am interesting in bulk loading R-Trees. What kind
> of approaches uses postgis for bulk loading: sort based or sort tile
> recursive (STR)?
>
> Thanks,
>
> Daniar Achakeyev

Hi Daniar,

PostGIS indices are built using the PostgreSQL GiST API (see 
http://www.postgresql.org/docs/9.0/interactive/gist-implementation.html 
for the API in use) and these methods are generally called for each item 
at a time. Hence there isn't really any support for bulk-loading 
information into the R-Tree, although you could conceivably come up with 
something that generates the pages within PostgreSQL at a very low level.

There has been some work to show that changing the order in which 
geometries are loaded (via a locality-based pre-sort) into the index can 
result in better R-Trees and hence quicker build times, but I don't 
think anyone is actively working on this.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-users mailing list