.Net 4.0 内存映射文件与 RDMS 存储

发布于 08-08 23:08 字数 451 浏览 20 评论 0原文

我对人们的想法感兴趣,比较在基于 SQL 的传统数据库中存储数据或利用 内存映射文件,例如新的 .Net 4.0 运行时中的文件。所讨论的数据将是简单结构的数组。

明显的优点和缺点:

SQL 数据库优点

  1. 即席查询支持
  2. SQL 管理工具
  3. 架构更改(添加更多列并设置默认值)

内存映射优点

  1. 开销更轻? (这是我的假设)
  2. 可在进程线程之间共享
  3. 还有其他吗?

为了性能提升值得吗?

I'm interested in people's thoughts comparing storing data in a traditional SQL based Database or utilising a Memory-Mapped File such as the one in the new .Net 4.0 runtime. The data in question would be arrays of simple structures.

Obvious pros and cons:

SQL Database Pros

  1. Adhoc query support
  2. SQL Management Tools
  3. Schema changes (adding more columns and setting default values)

Memory-Mapped Pros

  1. Lighter overhead? (this is an assumption on my part)
  2. Shareable between process threads
  3. Any others?

Is it worth it for performance gains?

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

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

发布评论

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

评论(2

情徒2024-08-15 23:08:24

您可以尝试 MongoDB,并获得两个世界的混合(内存映射存储上的类似数据库的功能)。

MongoDB 弥合了两者之间的差距
键值存储(快速且
高度可扩展)和传统 RDBMS
系统(提供丰富的查询
和深层功能)。

这里有一篇好文章,可以引导您完成 MongoDB 的安装和编码:

Going NoSQL with MongoDB

You could try out MongoDB, and get a mixture of both worlds (database-like features over a memory mapped store).

MongoDB bridges the gap between
key-value stores (which are fast and
highly scalable) and traditional RDBMS
systems (which provide rich queries
and deep functionality).

Here's a good article that can walk you through installing and coding to MongoDB:

Going NoSQL with MongoDB

桜花祭2024-08-15 23:08:24

如果选择“SharedMemory”作为协议,SQLServer 可以使用内存映射文件。否则它将使用管道、TCP 或 VIA。

关于优点和缺点..对我来说它们几乎没有可比性。 SQL 内置了整个查询/多用户/事务等基础设施。如果您使用 MMF 进行存储,那么您就需要自己处理所有这些问题。另一方面,MMF 内置于操作系统中。没有服务器/服务的种子。

SQLServer can use memory mapped files if you choose "SharedMemory" as the protocol. Otherwise it'll use Pipes, TCP or VIA.

Regarding pros and cons.. to me they are amost not comparable. SQL has the whole query/multiuser/transaction etc infrastructure built in. If you store with MMF's you are on your own regarding all that. On the other hand, MMF are built in the OS.. no seed for a server/service.

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