SQLite Forum

Fast way to insert rows in SQLite

<pre>The Python sqlite3 module by default issues a BEGIN statement
implicitly before a Data Modification Language (DML) statement
Changed in version 3.6: sqlite3 used to implicitly commit an
open transaction before DDL statements. This is no longer the

Given the above, I'm not sure whether you are correctly controlling your transactions.  I would be explicitly issue both <code>BEGIN</code> and <code>COMMIT</code> commands.  But I don't know enough about Python to understand the implications.

Not at all sure that this is your problem, but it might help you figure out why Python is so much slower than Rust.