跨平台应用程序允许文本文件获得的合理最大大小是多少?

发布于 2024-08-04 12:04:18 字数 397 浏览 3 评论 0原文

跨平台应用程序允许文本文件获得的合理最大大小是多少?我知道这是一个过于简单化的问题,所以请允许我解释一下。

我的团队正在实现一个批量加载接口,供客户将数据加载到我们的数据库中。它将写出一个 CSV 文件,然后将该文件加载到适当的数据库(此时为 Oracle 或 SQL Server)。我们可能正在处理相对较多的记录。

在开始将这些文本文件分解为多个文本文件之前,我应该对这些文本文件的大小设置任何限制吗?目前,我们正在部署到 Linux 和 Windows,但我们也有使用 OS X 的开发人员。此外,我们的一些客户拥有这些操作系统的版本有些过时。我想这取决于我们连接的操作系统、文件系统和 RDBMS。为了简单起见,我不想尝试为每个单独的平台设置限制,而是只想设置一个总体限制(只要该限制不是过度限制)。这是否有必要,或者我可以全面设置上限吗?

What's a reasonable maximum size that a cross-platform application could allow a text file to get? I understand that this is an oversimplified question so allow me to explain.

My team is implementing a bulk load interface for clients to load data into our database. It will write out a CSV file and then load that file into the appropriate database (at this point either Oracle or SQL Server). We could be dealing with a relatively high number of records.

Is there any limit I should put on the size of these text files before I start breaking it up into multiple text files? Currently, we're deploying to Linux and Windows, but we also have developers using OS X. Plus, some of our clients have somewhat dated versions of these operating systems. I'd imagine that this is dependent upon the OS, file system, and RDBMS that we're connecting to. Rather than trying to set a limit for each individual platform, I'd like to just have one overall limit for simplicity's sake (as long as that limit isn't overly restrictive). Is this even necessary, or is there a cap I can set across the board?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独守阴晴ぅ圆缺 2024-08-11 12:04:18

大多数现代系统在处理多 GB 文件时都没有问题,但如果您想谨慎一点,那么设置 2GB 的限制可能会很有用:

  • 即使稍微过时的文件系统也可以存储 2GB 文件(例如 FAT16)
  • 2GB 可以通过带符号的 32 位整数来寻址,该整数的使用频率比人们想象的要高

对于文件系统部分 这种文件系统的比较可能有用(尽管它也列出了许多并未真正广泛使用的系统)。

Most modern systems have no problem handling multi-gigabyte files, but if you want to be cautious, then setting a limit of 2GB can be useful:

  • Even slightly out-of-date file systems have no problem storing 2GB files (for example FAT16)
  • 2GB can be addressed by a signed 32-bit integer, which is used more often than one might think

For the filesystem part this comparison of file systems might be useful (it lists a lot of not-really-widely-used systems as well, 'though).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文