Re: [gdal-dev] Writing to SQLite is very slow

2010-01-18 Thread Roald de Wit
On 19/01/10 01:23, Frank Warmerdam wrote: Roald, Would you mind filing a ticket on this? I think the CopyLayer() method ought to use transactions in a manner similar to ogr2ogr. Best regards, Hi Frank, Done: http://trac.osgeo.org/gdal/ticket/3335 Thanks, Roald ___

Re: [gdal-dev] Writing to SQLite is very slow

2010-01-18 Thread Frank Warmerdam
Roald de Wit wrote: Hi Even, Thanks for this. Crschmidt *did* mention the transactions and I guess it would work if I were to create an empty layer and walk through the features one by one. I was hoping to use the 'CopyLayer' method of a DataSource (for simplicity's sake). It seems that you c

Re: [gdal-dev] Writing to SQLite is very slow

2010-01-18 Thread Roald de Wit
Hi Even, Thanks for this. Crschmidt *did* mention the transactions and I guess it would work if I were to create an empty layer and walk through the features one by one. I was hoping to use the 'CopyLayer' method of a DataSource (for simplicity's sake). It seems that you can provide options to

Re: [gdal-dev] Writing to SQLite is very slow

2010-01-17 Thread Even Rouault
Roald, You should try using transactions as suggested on IRC. This does make a lot of difference for SQLite. if 'lyr' is the Python object for your SQLite layer : lyr.StartTransaction() ... insert features lyr.CommitTransaction() Best regards, Even Le Monday 18 January 2010 06:32:47 R

[gdal-dev] Writing to SQLite is very slow

2010-01-17 Thread Roald de Wit
Hi list, Whilst trying to mimic ogr2ogr functionality in Python, I stumbled upon an issue with writing to SQLite: it works, but it's painfully slow (minutes instead of seconds). The link below points to an example that can be used for reproducing the behaviour: http://rdewit.pastebin.com/f7