Is mutliple-execute-one-commit slower than multiple single-execute-single-commit?

Peng Yu <[email protected]>
Newsgroups gmane.comp.db.sqlite.general
Message-ID <CABrM6wnqHa8xJMh6HkQmLQEJP31GO49S50Xq8dNTOCZdJ7fvLQ@mail.gmail.com>
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
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.