If you could provide more information then maybe someone can suggest a reason or even a solution for the effect you are seeing. Some of the following may be helpful.
What schema are you using? Which journal mode is your database running in? What kind of statements are executed? How are you controlling transactions? How are you measuring speed? Can you replicate the problem by running the statements in the sqlite shell? -----Ursprüngliche Nachricht----- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Peng Yu Gesendet: Mittwoch, 29. Januar 2020 07:42 An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org> Betreff: [EXTERNAL] [sqlite] Is mutliple-execute-one-commit slower than multiple single-execute-single-commit? Hi, I have two python programs using sqlite3. They function the same, except the following. In the first, execute() is called in batches and then commit() is called following them. In the second, commit() is called after each execute(). It seems that the second case is faster (I can not separate my code in a self-contained test case to show here). This is counterintuitive. I thought the first should be faster. Is it expected that the 2nd case should be slightly faster? -- Regards, Peng _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users