On Dec 1, 2008, at 9:11 PM, Brown, Daniel wrote: > I'm using "PRAGMA journal_mode = MEMORY" combined with an in memory > database ":memory:" on version 3.6.1. And I too am seeing lots of > temporary file activity, which is really killing our performance as > our > storage medium is so slow.
Try using PRAGMA temp_store=MEMORY; In addition to PRAGMA journal_mode=MEMORY; > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Stephen > Abbamonte > Sent: Monday, December 01, 2008 3:50 PM > To: 'General Discussion of SQLite Database' > Subject: Re: [sqlite] Journal files > > I just tried this line also and the journal files are still being > created > here is the code I am running: > > > int32_t ret = sqlite3_open(filename, m_DatabaseRef); > if( ret == SQLITE_OK ) > { > sqlite3_stmt* sqlStmt = NULL; > ret = sqlite3_prepare_v2(m_DatabaseRef, s_ "PRAGMA > main.journal_mode = OFF;", -1, &sqlStmt, NULL); > if( ret == SQLITE_OK ) > { > sqlite3_step(sqlStmt); > const unsigned char* colValue = > sqlite3_column_text(sqlStmt, 0); <----- returns "off" > sqlite3_finalize(sqlStmt); > } > } > > Anything wrong with the way I am doing this? > Thanks for the help. > > >> Did you set >> >> PRAGMA journal_mode = OFF; >> >> ? The way I read the documentation (on a second or third close >> reading, I think), this only sets the default value for new databases >> to be attached, but doesn't affect your main connection and any >> databases that have already been attached. So what I do is >> >> PRAGMA main.journal_mode = OFF; >> >> IIRC, I needed this line to actually turn off the journals (tested >> with 3.4.x and 3.5.x versions of SQLite only, though). >> >> Cheers, >> Stefan > > > > _______________________________________________ > 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 D. Richard Hipp [EMAIL PROTECTED] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users