SQLite3数据库的最大连接数是多少? [英] What is the maximum number of connections for a SQLite3 database?

查看:246
本文介绍了SQLite3数据库的最大连接数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQLite3数据库的最大连接数是多少?

What is the maximum number of connections for a SQLite3 database?

为什么我不能将其用于大型网站,例如拥有300万用户的网站? / p>

Why can't I use it for very big websites, for example with 3 million users?

推荐答案

http://sqlite.org/ whentouse.html 解释了另一个RDBMS可能更有效的情况:

http://sqlite.org/whentouse.html explains "Situations Where Another RDBMS May Work Better":


SQLite在整个数据库上使用读/写锁文件。这意味着,如果有任何进程正在从数据库的任何部分读取,则将阻止所有其他进程写入数据库的任何其他部分。同样,如果有任何一个进程正在写入数据库,则将阻止所有其他进程读取数据库的任何其他部分。在许多情况下,这不是问题。每个应用程序都会快速完成其数据库的工作并继续运行,并且锁定不会持续超过几十毫秒。但是有些应用程序需要更多的并发性,而这些应用程序可能需要寻求不同的解决方案。

SQLite uses reader/writer locks on the entire database file. That means if any process is reading from any part of the database, all other processes are prevented from writing any other part of the database. Similarly, if any one process is writing to the database, all other processes are prevented from reading any other part of the database. For many situations, this is not a problem. Each application does its database work quickly and moves on, and no lock lasts for more than a few dozen milliseconds. But there are some applications that require more concurrency, and those applications may need to seek a different solution.

这篇关于SQLite3数据库的最大连接数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆