You're welcome. Let's hold judgment on whether any of them turn out to be helpful :o).
Increasing the page size might help, it also gives you four times the cache with the same default setting of 2000 cache pages. I would suggest again that you consider bumping that number of cache pages up if you have memory available. On a modern system, it should be no big deal to allocate, say, 50MB for the page cache. Of course, increasing the cache will only help if your reads tend to be in the cache. By the way, the simplest way to take journaling out of the picture if you're done with all of your inserts and are just reading at that point is to reopen the database in read-only mode. This will turn off journaling and I think will might also reduce any locking that might occur even if you are accessing the database from multiple threads. Also by the way, if you're doing C++, you might want to consider using a C++ wrapper for SQLite; it might simplify your code significantly. I've used a thin wrapper called CppSqlite for a couple of years (and have had to tweak it only slightly during this time). Here is SQLite's page on wrappers: http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Frank Chang Sent: Saturday, May 28, 2011 9:38 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is it possible to optimize the readperformanceof a C++ app using sqlite pragma journal_mode = wal Michael Stephenson, We want to thank you again for your excellent suggestions regarding how to improve the speed of our Sqlite WAL reads and our deduper prototype. We looked at the SQlite documentation for increasing the Sqlite page size to 4K and an excerpt of our code is shown below. If we can implement your suggestions corrrectly, we try to let you and the sqlite-users group about our results if they are meaningful. Thank you for taking the time to write all of your suggestions and ideas. strcpy(Command,"PRAGMA page_size=4096"); ReturnValue=sqlite3_prepare(Database,Command,-1,&Statement,0); printf("1 ReturnValue %d\n",ReturnValue); status = sqlite3_step(Statement); printf("1 status %d\n",status); status = sqlite3_finalize(Statement); printf("1 status %d\n",status); strcpy(Command,"VACUUM"); ReturnValue=sqlite3_exec(Database,Command,callback,0,&Msg); if (Msg!=0) { strcpy(LastError,Msg); sqlite3_free(Msg); } printf("1-1 ReturnValue %d\n",ReturnValue); _______________________________________________ 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