In the case of Sqlite the shared resource is the file holding the database. One way or another threads and processes have to serialize their access. A single process with exclusive access is clearly the way to achieve maximum throughput.

Databases spread across multiple spindle disk farms can have parallel access, but they are heavy, not lite.

[EMAIL PROTECTED] wrote:
John Stanton <[EMAIL PROTECTED]> wrote:

When multi-processor machines are used thread usage may indeed implement parallel processing when used appropriately and have tangible benefits.



True enough, in general. But with SQLite 3.5, access to each database connection is serialized. So even though the interface allows you to have 20 different threads all doing sqlite3_exec() on the same connection at the same time, the SQL statements are still being processed one by one, regardless of how many CPUs you devote to the task.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to