SQL Server 版本(紧凑版、快速版)中表(对象)的最大数量
您可以拥有的最大表数是多少:
- SQL CE4
- SQL 2008 R2 Express
此处的数字 http://msdn.microsoft.com/en-us/library/ms143432.aspx 我猜是针对 SQL Server 2008,但它们是吗对于 Express 有效,那么 SQL CE4 又如何呢?
数据库中所有对象的数量总和不能超过2,147,483,647
BTW。抱歉重复的问题 ,但在我看来,Stackoverflow 提供答案的速度更快。
What are the maximum number of tables that you can have in:
- SQL CE4
- SQL 2008 R2 Express
Numbers here http://msdn.microsoft.com/en-us/library/ms143432.aspx I guess is for SQL Server 2008, but are they valid for Express and what about SQL CE4?
The sum of the number of all objects in a database cannot exceed 2,147,483,647
BTW. Sorry for duplicating questions, but it seems to me Stackoverflow is providing answers more quickly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
没有关于 CE 的消息,但 Express 是正常的 SQL Server + 数据库大小和内存/处理器限制...如果您可以将 yoru 表放入该大小,则正常的 SQL Server 限制适用。
No word about CE, but Express is normal SQL Server + database size and memory / processr limitations.... If you can fit yoru tables into the size, the normal SQL Server limity apply.
SQL Server Compact 3.5 的限制如下:
http://msdn.microsoft.com/en -us/library/ms172451%28v=SQL.105%29.aspx 但这仅指出每个表有 1024 列,并且没有特定的表限制。
正如 TomTom 指出的那样,SQL Server Express 与普通 SQL Server 相同,只是受到内存、处理器和数据库大小的限制,SQL Server Express 版本的限制为:
否则Express版本是标准的,这是为了允许数据库在SQL Server Standard和SQL Server Express之间移动,这有助于系统开发。因此,对于 SQL Express,它仍然是
数据库中所有对象的数量总和不能超过 2,147,483,647
正如我在评论中所说,
如果您正在做任何接近达到这些数字的事情你应该真正看看你的数据库设计过程,如果它们是自动生成的,那么考虑不要分区到这么多表中。
我的意思是,如果假设你应该根据其他要求选择 SQL Server 版本SQL CE 是限制为 256 个表(并不是说确实如此,因为我找不到这样的东西,而且更有可能至少超过 1024 个),并说您需要 500 个表。然后要么考虑对某些表进行非规范化,要么在那时您确实需要升级以将 SQL Express 包含在您的程序中(这只会使您的软件部署过程复杂化,但不会更多)。
我没有 SQL CE 可用 atm,但最简单的方法是运行一个测试并生成 10k 个创建表语句,每个表有 20 多个列。如果您的要求大于此值,则只需使用您知道的数字即可。
最后,还有您没有询问过的 SQLite,同样没有关于此的文档,但我怀疑它可能是 64k+,但您在连接中只能限制 64 个表。
SQL Server Compact 3.5 limitations here:
http://msdn.microsoft.com/en-us/library/ms172451%28v=SQL.105%29.aspx but that only points out 1024 columns per table and no specific table limitation.
SQL Server Express is the same as normal SQL Server as TomTom points out, it's just limited by memory, processor and database size, the limits of SQL Server Express edition are:
Otherwise express edition is standard, this is to allow databases to be moved to and from SQL Server Standard to SQL Server Express, which helps in system development. So for SQL Express it's still
The sum of the number of all objects in a database cannot exceed 2,147,483,647
As I said in a comment,
if you're doing anything that gets close to hitting these numbers you should really look at your DB design process, if they're being automatically generated then consider not partitioning into so many tables.
By this I mean that you should be selecting your SQL Server version based on other requirements, if suppose SQL CE is limited to 256 tables (not saying that it does since I can find no such thing, and it's much more likely to be at least past 1024), and say you need 500 tables. Then either look at denormalizing some of your tables, or at that point you really need to upgrade to including SQL Express with your program (this just complicates your software deployment process, and not a lot more).
I don't have SQL CE avail atm, but the easiest way would be to just have a test go run off and generate 10k create table statements, with each table having 20+ columns. If your requirements are greater than that then just use numbers that you know.
Lastly, there's SQLite which you haven't asked about, again there's no documentation on this but I suspect it's likely 64k+ you're limited to only 64 tables in a join though.
对于 SQLCe4,我得到了响应:
For SQLCe4, I got the response: