database Microsoft Access 2003 数据库可以存储多少条记录?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5306589/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 08:07:01  来源:igfitidea点击:

How many records can Microsoft Access 2003 database store?

databasems-access

提问by Tim Li

I was wondering about it. I have to put more than 1,200,000 records into a access database for backing up. thanks for answering me.

我想知道它。我必须将超过 1,200,000 条记录放入 Access 数据库中进行备份。谢谢你回答我。

回答by Tony Toews

The hard limit is the 2 Gb Access database file size. However as Tim states there may be a performance problem depending on the number of records.

硬限制是 2 Gb Access 数据库文件大小。但是,正如 Tim 所说,可能存在性能问题,具体取决于记录数。

However a hard-to-quantify limit may be the number of pages that Access can create. It may very well be that Access uses one page per record when inserting records. Now given that Access 2000/Jet 4.0 and newer has 4K page sizes there can only be at most 500,000 pages per 2 Gb database. (Roughly due to system overhead.) Now you might be able to get around this problem by ensuring you exclusively lock the Access database file as Access 2000/Jet 4.0 and newer might then insert multiple records on a page.

但是,一个难以量化的限制可能是 Access 可以创建的页面数。很可能 Access 在插入记录时使用每条记录一页。现在,鉴于 Access 2000/Jet 4.0 和更新版本具有 4K 页面大小,每个 2 Gb 数据库最多只能有 500,000 个页面。(大致是由于系统开销。)现在您可以通过确保独占锁定 Access 数据库文件来解决这个问题,因为 Access 2000/Jet 4.0 和更新版本可能会在页面上插入多条记录。

Added later:Now if you do a compact and repair this will place as many records in one page as possible. If you were to add all the records at once then you might have more problems. But if you cuold put in say 600K, compact and the rest this might get you more room.

稍后添加:现在,如果您进行压缩和修复,这将在一页中放置尽可能多的记录。如果您要一次添加所有记录,那么您可能会遇到更多问题。但是,如果您输入 600K、紧凑型和其余部分,则可能会为您提供更多空间。

However I would suggest looking at other alternatives with that volume of records.

但是,我建议查看具有该数量记录的其他替代方案。

回答by mwolfe02

Tony's answer is right on.

托尼的回答是正确的。

For anecdotal purposes, I can tell you I have one ~300 MB .mdb that has a single table currently holding over 2.4 million records. We've had no corruption of the .mdb and it has been in production use for over three years. It sits on a network drive and is updated by about five different people (accessed read-only by maybe ten more).

出于轶事目的,我可以告诉您我有一个大约 300 MB 的 .mdb,它有一个当前包含超过 240 万条记录的表。我们没有损坏 .mdb,它已经在生产环境中使用了三年多。它位于网络驱动器上,由大约五个不同的人更新(可能还有十个以只读方式访问)。

We have not had any problems, but upsizing the datastore to SQL Server is definitely on the to-do list.

我们没有遇到任何问题,但将数据存储升级到 SQL Server 绝对是待办事项。

回答by Eric

MS Access calls MDB files databases, but they are really just tables. Your database is made up of thousands of these MDB files each containing 2 GIG of data. Each MDB file for example could hold the data for 1 of 50 states in the U.S. So you have 100 GIG of storage space in your database for 50 MDB files. Or perhaps you have 50 clients and store each in a separate MDB file, but it is all one database, just stored in separate files by each client. Informix Standard Engine (SE) worked like this year ago before Dynamic Server came out. I like seeing my DB files. I did not like Dynamic Server's vapor DB files held on cloud 9. And I did not like DS storing tables on different partitions. Try running a SQL statement on 2 tables, each on a separate partition, and see how horrible the performance is. SQL Server is probably the same way. That is why I use MS-Access 97 databases for all my Win32 Perl applciations that connect by ODBC and manage all user traffic. My compiled program contains the password, so no one can edit the databases except via the Perl applications.

MS Access 调用 MDB 文件数据库,但它们实际上只是表。您的数据库由数千个这样的 MDB 文件组成,每个文件包含 2 GIG 的数据。例如,每个 MDB 文件可以保存美国 50 个州之一的数据,因此您的数据库中有 100 GIG 的存储空间可用于 50 个 MDB 文件。或者,您可能有 50 个客户端,并且每个客户端都存储在一个单独的 MDB 文件中,但它都是一个数据库,只是由每个客户端存储在单独的文件中。Informix 标准引擎 (SE) 的工作方式与去年 Dynamic Server 出现之前的情况类似。我喜欢看我的数据库文件。我不喜欢动态服务器的云 9 上的蒸气 DB 文件。我不喜欢 DS 将表存储在不同的分区上。尝试在 2 个表上运行 SQL 语句,每个表在一个单独的分区上,看看性能有多糟糕。SQL Server 大概也是这样。这就是为什么我将 MS-Access 97 数据库用于所有通过 ODBC 连接并管理所有用户流量的 Win32 Perl 应用程序。我编译的程序包含密码,所以除了通过 Perl 应用程序之外,没有人可以编辑数据库。

回答by Aaron Kempf

I used to use millions upon millions of rows in Access. I had a dozen tables / databases with a millions rows each, running most of the database work for an accounting department for a retail chain with 50 stores. (we had an AccPac consultant come in once a month for an hour or two).

我曾经在 Access 中使用数百万行。我有十几个表/数据库,每个表/数据库都有数百万行,为拥有 50 家商店的零售连锁店的会计部门运行大部分数据库工作。(我们有一个 AccPac 顾问每个月来一次一两个小时)。

Access isn't the right solution for that job.

Access 不是该工作的正确解决方案。

I would recommend looking at SQL Server. I've been using SQL Server fulltime for 11 years now, I highly reccomend you take a look at 'Access Data Projects'.

我建议查看 SQL Server。我已经全职使用 SQL Server 11 年了,我强烈建议您查看“访问数据项目”。

If you upsize the database, Access calls it a 'Client-Server application'.

如果您升级数据库,Access 将其称为“客户端-服务器应用程序”。

Of course, I'm a SQL Server guy, so these guys are going to claim that I'm biased.

当然,我是一个 SQL Server 人,所以这些人会声称我有偏见。

回答by satheesh kumar

We can't store Unlimited data into the "MS Access" Database...

我们无法将无限数据存储到“MS Access”数据库中...

"Ms Access 2007" will allow you to store only Up to 2GB file size including tables,Modules,Reports,and etc...

“Ms Access 2007”将允许您仅存储最大 2GB 的文件大小,包括表格、模块、报告等...

If the Database Reaches more than 2GB Size then it will throw the error while you are writing through codings...

如果数据库达到超过 2GB 大小,那么它会在您通过编码编写时抛出错误...