[OSM-dev] [OSM-newbies] Should osm2pgsql create the planet_osm tables?

Martijn van Oosterhout kleptog at gmail.com
Tue Jan 22 11:24:59 GMT 2008


On Jan 22, 2008 11:15 AM, Alexander Wright
<silverfish at wright-family.me.uk> wrote:
> I've not seen the insert code, so please ignore me if this is done already!
> I believe that if you are importing large amounts of data, its usually better
> to drop indexes on a table, insert the data, the recreate the indexes
> afterwards.
>
> I'm quite prepared to believe there is a good reason for not doing this,
> though.

It does do it. Within a single transaction the tables and indexes are
dropped, recreated, data inserted, indexes created. The new data
appears atomically. It just takes a really long time. Which version of
postgres you use also matters.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list