Re: [sqlite] Periodical dump of in-memory database into a disk file
I tried this and it did not seem to make any difference. Basically, I open my main database :memory: first and then set PRAGMA synchronous = OFF. After I ATTACH diskfile AS external, I just periodically do BEGIN; DELETE FROM external.tables; INSERT INTO external.tables SELECT * FROM tables; COMMIT;. Should I set synchronous to the external db? But I don't open any connection to it so where/how I run PRAGMA synchronous = OFF on it? Thx. --- On Thu, 7/10/08, Shawn Wilsher [EMAIL PROTECTED] wrote: From: Shawn Wilsher [EMAIL PROTECTED] Subject: Re: [sqlite] Periodical dump of in-memory database into a disk file To: [EMAIL PROTECTED], General Discussion of SQLite Database sqlite-users@sqlite.org Date: Thursday, July 10, 2008, 2:19 PM You can try to help your issue by running PRAGMA synchronous = OFF; after you open your connection. Cheers, Shawn Wilsher Mozilla Developer On Thu, Jul 10, 2008 at 3:04 PM, X Wang [EMAIL PROTECTED] wrote: Hi, I have a sqlite in-memory databse that I want to periodically dump to a disk file (so I can look into its contents at runtime). Currently I ATTACH an extern file. Periodically I export everything from in-memory databse into the attached extern file and do a final COMMIT. However, this sometimes takes a long time (20 seconds) and totally freeze my multithreaded process(why would this freeze my network I/O threads? Maybe because those threads also do some logging?)... This is on Linux ext3, I also read a bit about Firefox's issue, so I think this is due to fsck. For my issue, actually I do not care too much about data integrity. Is there a way to reduce sqlite's fsck to minimum? Thx ___ 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
[sqlite] Periodical dump of in-memory database into a disk file
Hi, I have a sqlite in-memory databse that I want to periodically dump to a disk file (so I can look into its contents at runtime). Currently I ATTACH an extern file. Periodically I export everything from in-memory databse into the attached extern file and do a final COMMIT. However, this sometimes takes a long time (20 seconds) and totally freeze my multithreaded process(why would this freeze my network I/O threads? Maybe because those threads also do some logging?)... This is on Linux ext3, I also read a bit about Firefox's issue, so I think this is due to fsck. For my issue, actually I do not care too much about data integrity. Is there a way to reduce sqlite's fsck to minimum? Thx ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Periodical dump of in-memory database into a disk file
You can try to help your issue by running PRAGMA synchronous = OFF; after you open your connection. Cheers, Shawn Wilsher Mozilla Developer On Thu, Jul 10, 2008 at 3:04 PM, X Wang [EMAIL PROTECTED] wrote: Hi, I have a sqlite in-memory databse that I want to periodically dump to a disk file (so I can look into its contents at runtime). Currently I ATTACH an extern file. Periodically I export everything from in-memory databse into the attached extern file and do a final COMMIT. However, this sometimes takes a long time (20 seconds) and totally freeze my multithreaded process(why would this freeze my network I/O threads? Maybe because those threads also do some logging?)... This is on Linux ext3, I also read a bit about Firefox's issue, so I think this is due to fsck. For my issue, actually I do not care too much about data integrity. Is there a way to reduce sqlite's fsck to minimum? Thx ___ 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