I implemented connection pooling in the .NET wrapper and using the pool it takes 90ms for 1,000 connections or 500ms if I clear out attached databases and temp tables each time.
Is there a really quick way to reset attached/temp tables on a connection? Right now I do a pragma database_list; followed by a select type, name from sqlite_temp_master; and loop through the results which apparently takes 400us when there are no attached tables and temp is empty (longer if it actually has to detach/drop something). Thanks, 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: Samuel R. Neff [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007 11:58 PM To: 'sqlite-users@sqlite.org' Subject: RE: [sqlite] How fast is the sqlite connection created? I ran some tests and received fairly drastic results. Our schema has 67 tables right now (once we add in the history tables, it'll have about double that) and 116 indexes, excluding the automatic primary key indexes. I ran 1,000 simple select statements SELECT COUNT(*) FROM USERS; and the USERS table is empty (actually, the whole db is empty, only structure created for the tests). One statement per connection : 2906.3 ms One connection for all statements : 62.5 ms Some of this performance gain is probably related to caching data and query plan, not just opening the connection, but still that caching is connection related and is lost when you close the connection so it's a very real-world valid comparison. Best regards, Sam ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------