Michael Roth wrote:
> Exists the same error in the sqlite3_prepare call? Anybody validated
> this?

I just tested this with SQLite V3.0 and it does not display this quirk. I
get the same performance using a statement that is prepared inside a
transaction and one that is prepared outside a transaction. Both of these
execute much faster than the same statement when no explicit transaction is
used (i.e. automatic transaction per insert statement).

FYI: I did a loop that executed 5,000,000 precompiled inserts into a single
table in about 63 seconds with an explicit transaction. Using the automatic
transactions for each insert statement I can execute only 500 inserts in
about 61 seconds. Using explicit transactions is about 10,000 times faster!
Using sqlite_exec to execute the inserts directly, rather than precompiling,
with an explicit transaction does about 1,250,000 inserts in 64 seconds. The
precompiled statement is about 4 times as fast as direct execution (i.e.
compile and execute each statement).

Reply via email to