site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcbLKkOcgjPJ9DcdEduibwANkzDgag== Thread-topic: SQLite optimization User-agent: Microsoft-Entourage/11.2.0.050811 On 8/28/06 1:48 PM, "Mark Gilbert" <mark@gallery.co.uk> wrote: Hi Mark,
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.
In fact SQL Lite self do open/close of db file for each transaction. This was idea of its author. Many solutions in SQL Lite design rely on this idea, and this is why it is underlined that "SQLLite is single user engine". This idea in the same time means that you cannot have normal db cache, because each time close forget everything. At least this is my understanding of how it works.
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 ?
If you really want to get much better performance, I will recommend to try our Valentina database. http://www.paradigmasoft.com I predict that you will get speedup at least 10-30, sometimes 100+ times, and you will be able work with dbs in even millions records easy. Read e.g. http://www.paradigmasoft.com/en/testimonials Or just few days ago comment from our old C/C++ user: ---------------------------------------------------------------- On 8/25/06 1:23 AM, "Rosyna" <rosyna@unsanity.com> wrote:
Is there a universal version of the Valentina C SDK? Either the 1.x version (preferred) or the 2.x versions. Specifically I am looking for a universal version of libVCSDK_Macho.dylib.
C SDK is not ported yet to 2.x product line.
It is more easy port C SDK 1.x to universal I think.
If that is possible... The code that uses it is all C. It was written to use both Valentina 1.x C SDK and SQLite to test the speed of each. Of course, Valentina was 10-30x faster for what I was using it for.
-- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ruslan Zasukhin