views:

36

answers:

1

Is it ever a good idea to let a large amount of people connect to your website while it is using sqlite?

edit: I am using it in a critical ruby on rails application that may have hundreds of concurrent users.

A: 

There are two important properties unique to SQLite that I know of that are relevant:

  1. When doing multiple inserts, you will get better performance if you wrap them all in a single transaction. If the inserts are done individually, SQLite waits for the disk platters to rotate around completely on each insert, so that the inserted data can be read back from the disk and validated.

  2. When writing to a SQLite file, the entire file is locked, which can cause writer starvation. This situation improved in SQLite 3.

The SQLite website says that SQLite is suitable for small to medium traffic websites, with low OLTP capability. This accounts for about 95% of all websites.

Robert Harvey