SQLite optimization
SQLite optimization
- Subject: SQLite optimization
- From: Mark Gilbert <email@hidden>
- Date: Mon, 28 Aug 2006 11:48:37 +0100
Hi There.
My app accesses the same SQlite database from several threads, and in
order to accommodate this I currently open and close the database on
each access, and the various threads will wait when the database is
busy on another thread.
This all works OK, but I am finding performance issues, which I think
may be related to the opening and closing.
My idea is to limit access to the database to a single intermediate
thread, with each other thread passing their requests through the
'owner' thread for the SQLite database. My hope is that this thread
can leave the database permanently open with a large cache size and
consequently speed things up.
Would anyone with experience in SQLite performance care to comment if
this is a good strategy to improve performance ?
Currently an open/access/close cycle is taking around 250mSecs,
even though its a tiny database and fairly simple SQLite requests. I
may need to do several database accesses per second, so currently its
all stacking up.
Any comments ?
Thanks
--
email@hidden
Tel: +44 208 340 5677
fax: +44 870 055 7790
http://www.gallery.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden