从PDO增加SQLite中附加数据库的限制 [英] Increasing Limit of Attached Databases in SQLite from PDO
问题描述
我正在研究一个项目,该项目应该从每个表使用一个数据库文件中受益匪浅,主要是因为我正在尝试避免数据库过大,也是由于文件锁定问题.
I'm working on a project that should benefit greatly from using one database file per each table, mostly because I'm trying to avoid having the database grow too large but also because of file locking issues.
我考虑过使用 最大附加数据库数
ATTACH语句是一个SQLite扩展,它允许两个或多个
要与同一数据库连接和数据库关联的数据库
就像它们是单个数据库一样运行.的数量
同时连接的数据库限于SQLITE_MAX_ATTACHED
默认设置为10. SQLite中的代码生成器使用
位图,以跟踪附加的数据库.这意味着
附加数据库的数量不能增加到62以上. The ATTACH statement is an SQLite extension that allows two or more
databases to be associated to the same database connection and to
operate as if they were a single database. The number of
simultaneously attached databases is limited to SQLITE_MAX_ATTACHED
which is set to 10 by default. The code generator in SQLite uses
bitmaps to keep track of attached databases. That means that the
number of attached databases cannot be increased above 62. 由于我将需要支持10个以上的表,所以我的问题是,如何将PHP中的 Since I will need to support more than 10 tables, my question is, how do I set the 这些限制是编译时选项. 您必须重新编译PHP才能更改它们. You must recompile PHP to change them. 这篇关于从PDO增加SQLite中附加数据库的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!ATTACH
语句来拥有一个虚拟"数据库,我所有的表,但是我发现,虽然附加数据库的上限是62(这对我来说是完全可以接受的),但附加数据库的默认限制实际上是10,来自
SQLITE_MAX_ATTACHED
变量设置为更高的值(将PDO与SQLite 3结合使用)?SQLITE_MAX_ATTACHED
variable to a higher value from PHP (using PDO with SQLite 3)?推荐答案