Re: [sqlite] question about performance

2006-02-08 Thread Xavier Noria
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

Re: [sqlite] question about performance

2006-02-08 Thread Christian Smith
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

Re: [sqlite] question about performance

2006-02-08 Thread Xavier Noria
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

Re: [sqlite] question about performance

2006-02-08 Thread drh
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

RE: [sqlite] question about performance

2006-02-08 Thread Doug Nebeker
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. -

Re: [sqlite] question about performance

2006-02-08 Thread Clay Dowling
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)