Bug report #3002
Slow conversion to spatialite using "Save as"
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Mandriva||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||13062|
Saving a shapefile to SQLite using the right click menu "Save as" is anormally slow, the qgis' process is constantly switching between jbd2_log_wait_commit and blkdev_issue_flush with less than 1% of the cpu. The convertion takes nearly one hour to complete.
Converting the same file with ogr2ogr is taking less than 30sec
ogr2ogr -f "SQLite" ~/rgc2009.sqlite ~/rgc2009.shp -a_srs EPSG:2154 -dsco SPATIALITE=yes
I've joined a test file, steps to reproduce :
1. add the shapefile to a new project
2. right click and Save as
3. choose SQLite and save
#5 Updated by Paolo Cavallini about 8 years ago
- Status changed from Open to Feedback
- Affected QGIS version set to master
- Crashes QGIS or corrupts data set to No
From the developer of SpatiaLite:
Apparently the problem is not related to SpatiaLite, but OGR: the export function generates a strange DB SQLite in FDO format.
The slowness is due to the fact that every record generate a separate INSERT, instead of the driver opening a transaction (BEGIN/COMMIT).
With GDAL 1.9.0 at least the DB format should be ok. Please test it, now that GDAL 1.9RC1 is out.