• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SQLite optimization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: SQLite optimization
      • From: Ruslan Zasukhin <email@hidden>
    • Re: SQLite optimization
      • From: Kevin Van Vechten <email@hidden>
    • Re: SQLite optimization
      • From: Sjoerd Tieleman <email@hidden>
  • Prev by Date: Re: Mount Points
  • Next by Date: Re: SQLite optimization
  • Previous by thread: Re: Mount Points
  • Next by thread: Re: SQLite optimization
  • Index(es):
    • Date
    • Thread