[gdal-dev] OSM to Postgis very slow without PG_USE_COPY YES

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Wed May 29 01:14:35 PDT 2013


Hi,

I was comparing OSM -> PostGIS conversion with and without 
--config PG_USE_COPY YES

With PG_USE_COPY YES - 1 minute
Without PG_USE_COPY YES - I canceled the conversion after an hour

The difference is so big that I wonder if it really comes only from the
write method or if there is something else going on as well.

I had -gt 20000 included in both tests as you can see from my command below.
For the slow run I just cut away the PG_USE_COPY config option.

ogr2ogr -f PostgreSQL PG:"dbname='db' host='host' port='4326' user='user'
password='passwd'" finland.osm.pbf -gt 20000 -progress --config
OSM_COMPRESS_NODES YES  --config PG_USE_COPY YES

I have no access to the PostgreSQL configuration but I can ask from the DB
admins if there is something that should be checked from the postgresql.conf
file.

-Jukka Rahkonen-



More information about the gdal-dev mailing list