[gdal-dev] ogr2ogr Postgres upload performance

Jan Heckman jan.heckman at gmail.com
Mon May 23 06:14:55 PDT 2022


Perhaps the spatial index update (in de DB) slows the insertion.
It might be more efficient to not create the SI in the first run,
then insert more rows and create the SI after all is done.
I don't know how to turn off SI creation in the command line.

On Mon, May 23, 2022 at 3:04 PM Alexandre Gacon <alexandre.gacon at gmail.com>
wrote:

> Hello,
>
> I am using ogr2ogr to upload data from several geopackages to a postgis
> database. Some tables contain thousands of rows (buildings for example).
>
> The import of the first file is quite fast (tables are created for the
> first file so PG_USE_COPY is used) but the following file is much slower
> (using INSERT instead of COPY).
>
> How could I data insertion for the other files? Force PG_USE_COPY ?
> Increase the value of GT ? Postpone spatial index creation ?
>
> Should I concatenate all the geopackages first and then insert the data in
> Postgis?
>
> Thank you for your help
>
> --
> Alexandre Gacon
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220523/10548070/attachment.htm>


More information about the gdal-dev mailing list