Hi Olaf, Thanks for the reply. I have tried answering some questions to your Questions and also have added some Questions of my Own.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Here are the "Real-time-requirements": --- The Application will be using the in memory SQLite as Cache. --- One thread in the application, is listening on the device and the data sent by the device is saved in the Cache or inserted to SQLite. This is the writer Thread. --- Multiple GUI's are connected to the Application which are being serviced by individual threads. These Threads are interacting with the cache (SQLite) and providing data to the GUI(s). These are the Reader Threads. --- The rate of data received at the Writer Thread will be varying. It is not constant as stated by me earlier. --- At any instant of time, if the data rate from device is very high and simultaneously the GUI is asking for Data, it is quite possible that Writer and Reader may collide. --- The Best Performance with SQLIte was observed with In Memory DB. With the amount of Data huge, it was amazing to see the response rate. With Disk based DB, the response was quite slow. So the prefernce is using "In Memory" DB. * Limitations like concurrent read and write operations * To overcome these we were thinking of using WAL mode but it is a disk based and IO might take a toll here. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Your Questions: Q1. Don't know, what you need these Reader-Threads for? Ans1: The application is client Server based, where there can be multiple instances of GUI connecting to the Application (running sqlite). The Application would handle display requests coming from these GUI threads. These are the reader threads. Q2. So, what is your usecase ... do you want to work with something like a ringbuffer? Are Deletes involved - and after what time do they begin "to kick in"? Ans2: Yes, kind of. We are using timers to maintain the size of the sqlite cache and limit it to a certain size (~1 Million Records) so that the DB does not bloat out of hand. We are using timers to click in every 15 seconds to delete the old records. Questions: Ques. No there will be no such instances, since the InMemory-DB-Connection is used on only one thread - but that isn't really a problem, if you "do it right"... >>>> Does that mean that only one connection can be made to In Memory DB? I >>>> read somewhere that in case of in memory db, if you open db again, it >>>> creates another db. Is it true? Ques: Does SQLite support Connection Pooling: Both for In Memory DB or Disk Based? If not supported, then how can we handle multiple simultaneous accesses to DB (R-R,R-W,W-W)? Will we have to do concurrency handling by ourselves? If not supported, then is there any thirdparty providing support for Connection Pooling? Ques: Can we use "SQLite Shared-Cache Mode" with "In Memory" Databases? WAL mode is not available for In Memory DB, but is "SQLite Shared-Cache Mode" also not available? Ques: You mentioned the following: 1. inserts of these 15 records in about 1-2msec max 2. it would be your responsibility, to perform only that many of these queued selects, that you stay within your 8-10msec- limit Idle-Time Are we gonna have to handle the read/write requests in our application so that we are able to create Idle Time between multiple writes? Ques: Am I correct in saying that you are only considering one thread that is handling both Read and Write requests in sequential manner? Regards Sachin -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Olaf Schmidt Sent: Tuesday, January 04, 2011 7:36 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Using WAL? "Sachin Gupta" <scgu...@ipolicynetworks.com<mailto:scgu...@ipolicynetworks.com>> schrieb im Newsbeitrag news:51b335651c9a0c4ea520d47f23a580b414f5baf...@sinnodmbx001.techmahindra.com... _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users