thanks for the reply.... But i have some clarifications though...
I downloaded System.Data.SQLite Dll from the website u mentioned but i was clearly stated that i was for Win32 systems.. ie for WIndows OS only... And i am using Linux. So is there a release for linux also? correct me if i am wrong... Also can u give me some sample code which implements connection pooling... And one more thing... From ur reply, i came to conclusion that Mono.data.SQLite does not provide pooling... we have to do it programmatically but having one static connection and managing threads... Also i have to convince my tech lead that connection pooling is not required in my scenario.. My scenario is I have max of 5-6 inserts/deletes/updates in one time... Max of some 10-20 selects at a time... Also any database activity is needed once in 2 hrs or so... Also i am managing write operation across threads..and also i am opening and closing connection immediately after use... SO do i need connection pooling really? Thanks and regards, Dinesh.R On 7/10/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote:
If you're using a recent version of MONO then I assume you're using System.Data.SQLite from Robert Simpson which is now bundled with MONO, right? I use a custom version of the same provider which has connection pooling implemented in the wrapper. We've found it to be a huge performance improvement for our typical business application since most user requests include a small number of short database queries. The time to establish a connection varies by schema and with ours we measured it at 17ms, so saving 17ms on every db call is huge (especially since most db calls average under 1ms). There have always been some warnings about using connections across threads but I think as long as the pool is managed properly and an individual connection is only used on one thread at any given time and all statements are properly closed before being released back to the pool, there are no problems. We've done a lot of testing and haven't run into any troubles. We'll be releasing our customized version of SQLite.NET wrapper with connection pooling as soon as we have some time to integrate the latest SQLite & SQLite.NET versions. BTW, I would request you make a post on the official System.Data.SQLite forum since the author hasn't expressed any interest in connection pooling yet even though there has been a lot of community interest (he does read this list as well though). http://sqlite.phxsoftware.com/forums/thread/3011.aspx HTH, - Sam ------------------------------------------- We're Hiring! Seeking a passionate developer to join our team building products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -----Original Message----- From: Dinesh Ramdass [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 10, 2007 3:56 AM To: sqlite-users@sqlite.org Subject: [sqlite] How to implement connection pooling HI , *How we use SQlite:* We use MONO and SQLite 3 for our project which runs on Linux. It is going to be used as an embedded database in a device. *What i want to do:* I want to use connection pooling either using some feature provided by SQLite or someone else *What i want to know:* I read in SQLite FAQs that we can have multiple connections. But there was a limitation with using same connection across threads. I think that u were referring to use of Connection pooling. So my question is around this *Question 1:* Does SQLite direct provide support for connection pooling in form of any library or opensource binary? *Question 2:* If there is no direct support for connection pooling, then is it becos we should not use? Does SQLite not advise the use of implementing connection pooling? *Question 3:* If my database access is going to be often but only for 5-6 rows CRUD operation at a time, then do u advice me to open a new connection and close it after use instead of maintaing an open connection for a long time or resetting a connection using timeout? Kindly reply A.S.A.P. Its pretty urgent . *Also i need to give a justification for not implementing CONNECTION POOLING to my client.* Kinldy provide me a justification. be Happy, Dinesh. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------