On Oct 14, 2008, at 9:06 PM, Gene Allen wrote: > I have a large sqlite database and I'm inserting a bunch of records > into it. > My question is this..shouldn't the -journal be getting larger since > I've > wrapped all the inserts inside a transaction? > > > > I'm watching the file sizes change and the main file is getting > larger, but > the journal files is staying at 44kb. Is there something > different I have > to do while large <over 3GB so far) databases?
When a page in an SQLite database file is modified, the old page data is written to the journal file. Later on, if a rollback is required, the original data is copied out of the journal file back into the database. If the INSERT statements are causing the database to grow, then the new pages appended to the end of the file do not have to be journalled, as there is no "old data". If a rollback is required, SQLite will just truncate the database file back to its original size. So the journal file does not grow. Dan. > Thanks > > > > Gene Allen > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users