Re: [EXTERNAL] Is mutliple-execute-one-commit slower than multiple single-execute-single-commit?

Hick Gunter <hick-p6o8VmWS/[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <c7bc6c50a0c159355dfd1c51bba4c8e7d70baa4f@localhost>
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:[email protected]] Im Auftrag von Peng Yu
Gesendet: Mittwoch, 29. Januar 2020 07:42
An: SQLite mailing list <[email protected]>
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
[email protected]
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
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.