开发者

How many connections can sqlite 3 handle?

开发者 https://www.devze.com 2023-01-14 19:32 出处:网络
Is it ever a good idea to let a large amount of people connect to your website while it is using sqlite?

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 usin开发者_运维百科g it in a critical ruby on rails application that may have hundreds of concurrent users.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消