Sqlite a grande vitesse

Thanks to a hint of HMK, the code to convert an OSM XML file to an Sqlite database is way faster now. Sqlite encapsulates any INSERT statement into a transaction per default.

To circumvent this behaviour, I just used a START TRANSACTION statement at the initialisation of the database and an END TRANSACTION statement (which is an alias to COMMIT) at the application’s exit. The code now is at least 10 times faster. All credits to HMK who shared the results of his research.

Comments are closed.