On Feb 8, 2006, at 17:24, [EMAIL PROTECTED] wrote:
If you do not do a BEGIN...COMMIT around your inserts,
then each insert has an implied BEGIN...COMMIT around itself.
That means you are doing 50 COMMITs.
A COMMIT is slow because it is "Durable" (The "D" in ACID).
That means that the operation
On Wed, 8 Feb 2006, Xavier Noria wrote:
>On Feb 8, 2006, at 17:10, Doug Nebeker wrote:
>
>> When you don't wrap everything in a transaction, each statement becomes
>> it's own transaction. And the database file is opened, updated, and
>> closed on each transaction. So your first case had roughly
On Feb 8, 2006, at 17:10, Doug Nebeker wrote:
When you don't wrap everything in a transaction, each statement
becomes
it's own transaction. And the database file is opened, updated, and
closed on each transaction. So your first case had roughly 50
times the
amount of file I/O and transacti
Xavier Noria <[EMAIL PROTECTED]> wrote:
> I have a simple schema and a sql loader that fills a table with
> initial values:
>
>delete from foo;
>insert into foo ...;
>insert into foo ...;
>... about 50 inserts ...
>
> To my surprise, the execution of these inserts took a few sec
When you don't wrap everything in a transaction, each statement becomes
it's own transaction. And the database file is opened, updated, and
closed on each transaction. So your first case had roughly 50 times the
amount of file I/O and transaction startup/commit overhead as the second
case.
-
Xavier Noria said:
> I have a simple schema and a sql loader that fills a table with
> initial values:
>
>delete from foo;
>insert into foo ...;
>insert into foo ...;
>... about 50 inserts ...
>
> To my surprise, the execution of these inserts took a few seconds
> (SQLite is 3.3.3)
6 matches
Mail list logo