[gdal-dev] Spatialite Insert Performance

Norman Vine nhv at cape.com
Tue Sep 17 13:43:33 PDT 2013


You can see how ogr2ogr uses this by looking at code starting
http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/ogr2ogr.cpp#L3304

the -gt argument sets the nGroupTransactions value


On Sep 17, 2013, at 4:22 PM, Bob Cave <bobc at bluemarblegeo.com> wrote:

> Hello,
> 
> I have written a program that uses GDAL 1.9.1 to insert data into a
> SQLite/Spatialite database, and I am running into performance problems with
> large amounts of data.  The SQLite/Spatialite section of the OGR
> documentation says, "The -gt argument allows to explicitly set the number of
> rows for each transaction. Explicitly defining -gt 1024 usually ensures a
> noticeable performance boost; defining an even bigger -gt 65536 ensures
> optimal performance while populating some table containing many hundredth
> thousand or million rows." Apparently, the value associated with the -gt
> parameter instructs OGR to commit the data after that number of rows have
> been inserted.
> 
> How can I set the value associated with the -gt argument from within my
> program?  Is there another way to optimize performance when inserting many
> rows? 
> 
> Thank you,
> 
> Bob
> 
> 
> 
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Spatialite-Insert-Performance-tp5078349.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130917/3367eb28/attachment.html>


More information about the gdal-dev mailing list