On Jan 17, 2008 3:48 PM, Philip Nick [EMAIL PROTECTED] wrote:
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded server
setting.
opening a file is very slow. You need to move it out of your loop.
I have noticed my program basically reads the whole database every time
I tracked down the problem. I was linking an old version of sqlite3 (3.0.8).
That was the old version we used. I apparently doesn't cache between calls.
My code now performs IO very similar to the CLI. Each subsequent query once
the db is open does not require re-reading the whole db.
My next
Upgrading to 3.5.4 will be bennificial. You should be able to pass the
connection around to the various threads with no problems.
Just make sure you compile (.configure --enable-threadsafe) and you should be
good. No need to add your own mutex as its done internally by the sqlite code.
Philip Nick wrote:
I tracked down the problem. I was linking an old version of sqlite3 (3.0.8).
That was the old version we used. I apparently doesn't cache between calls.
My code now performs IO very similar to the CLI. Each subsequent query once
the db is open does not require re-reading the
John Stanton wrote:
Philip Nick wrote:
I tracked down the problem. I was linking an old version of sqlite3
(3.0.8).
That was the old version we used. I apparently doesn't cache between
calls.
My code now performs IO very similar to the CLI. Each subsequent query
once
the db is open does
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded server
setting.
I use a Mutex to ensure only one process/thread can access the database at
one time.
The current flow of events:
Get Mutex
Open Database connection
Run Query
Close Database connection
Release Mutex
This
Philip Nick [EMAIL PROTECTED] wrote:
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded server
setting.
I use a Mutex to ensure only one process/thread can access the database at
one time.
The current flow of events:
Get Mutex
Open Database connection
Run Query
Thanks for replying,
I have tried moving the Open/Close outside the mutex no change.
As for using our own mutex, we started with early versions of sqlite and had
to come up with our own solution. I was planning on looking into using the
built in mutex's, but first I need to solve the performance
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
Philip Nick
Sent: Thursday, January 17, 2008 1:48 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] sqlite3 performace
Greetings,
Currently I am using sqlite3 in a multi-process/multi-threaded
Areyou doing an sqlite3_finalize and checking to see that you actually
close the DB?
Philip Nick wrote:
Thanks for replying,
I have tried moving the Open/Close outside the mutex no change.
As for using our own mutex, we started with early versions of sqlite and had
to come up with our own
10 matches
Mail list logo