Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SQLite optimization



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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.