sqlite 3 可以处理多少个连接?

发布于 2024-09-16 21:20:51 字数 101 浏览 4 评论 0原文

让大量的人在使用 sqlite 时连接到您的网站是一个好主意吗?

编辑:我正在一个关键的 ruby​​ on Rails 应用程序中使用它,该应用程序可能有数百个并发用户。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

执手闯天涯 2024-09-23 21:20:51

据我所知,SQLite 有两个相关的独特重要属性:

  1. 在进行多次插入时,如果将它们全部包装在一个事务中,您将获得更好的性能。如果插入是单独完成的,SQLite 会在每次插入时等待磁盘盘片完全旋转,以便可以从磁盘读回插入的数据并进行验证。

  2. 写入 SQLite 文件时,整个文件被锁定,这可能会导致写入器饥饿。 这种情况在 SQLite 3 中得到了改善。

SQLite网站称SQLite适合中小流量网站,具有较低的 OLTP 功能。这约占所有网站的 95%。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文