MS Access数据库引擎表中的最大行数? [英] Maximum number of rows in an MS Access database engine table?

查看:172
本文介绍了MS Access数据库引擎表中的最大行数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们知道MS Access数据库引擎受到了限制",以允许最大文件大小为2GB(或内部连线限制为小于2KB 4KB数据页的某些功能).但这实际上意味着什么?

We know the MS Access database engine is 'throttled' to allow a maximum file size of 2GB (or perhaps internally wired to be limited to fewer than some power of 2 of 4KB data pages). But what does this mean in practical terms?

为了帮助我衡量这一点,您能告诉我可以插入到MS Access数据库引擎表中的最大行数吗?

To help me measure this, can you tell me the maximum number of rows that can be inserted into a MS Access database engine table?

要满足表的定义,所有行都必须是唯一的,因此必须有唯一的约束(例如PRIMARY KEYUNIQUECHECK,数据宏等).

To satisfy the definition of a table, all rows must be unique, therefore a unique constraint (e.g. PRIMARY KEY, UNIQUE, CHECK, Data Macro, etc) is a requirement.

我意识到有一个理论上的限制,但是我感兴趣的是实际的(而不是切实可行的)现实生活的限制.

I realize there is a theoretical limit but what I am interested in is the practical (and not necessarily practicable), real life limit.

推荐答案

这是我的尝试:

我创建了没有键的单列(INTEGER)表:

I created a single-column (INTEGER) table with no key:

CREATE TABLE a (a INTEGER NOT NULL);

从1开始按顺序插入整数.

Inserted integers in sequence starting at 1.

当它插入65,632,875行时,我停止了它(在几个小时后任意). 文件大小为1,029,772 KB.

I stopped it (arbitrarily after many hours) when it had inserted 65,632,875 rows. The file size was 1,029,772 KB.

我压缩了文件,将其略微减少到1,029,704 KB.

I compacted the file which reduced it very slightly to 1,029,704 KB.

我添加了一个PK:

ALTER TABLE a ADD CONSTRAINT p PRIMARY KEY (a);

将文件大小增加到1,467,708 KB.

which increased the file size to 1,467,708 KB.

这表明最大值在8000万马克左右.

This suggests the maximum is somewhere around the 80 million mark.

这篇关于MS Access数据库引擎表中的最大行数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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