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


-------------------------------------------
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: Martin Jenkins [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 26, 2007 12:53 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How fast is the sqlite connection created?

Samuel R. Neff wrote:
> Thank you for the testing and information.

;)

> When I have time to run some tests using our actual schema (120+ tables,
> several hundred indexes) I'll post back here in case others are interested
> in our results.  From your tests it looks like more complex schemas
probably
> take more time to parse (as would be expected) so a real-world schema
might
> take longer than a test schema.

Please do, the more info the merrier. I wasn't sure if anyone would find 
it useful but thought I'd seed the list for future reference.

The schema was pretty trivial - all tables looked like

        "tXXX(a INT, b INT, c FLOAT, d TEXT)"

and to add the indexes I just added a UNIQUE constraint to a, b & d. It 
would be good to have some results from a real database.

Best Regards,

Martin

----------------------------------------------------------------------------
-
To unsubscribe, send email to [EMAIL PROTECTED]
----------------------------------------------------------------------------
-


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to