NoSQL 数据库 - 日志处理/聚合和汇总的良好候选者?

发布于 2024-10-13 11:41:42 字数 132 浏览 3 评论 0原文

我有一个用于捕获带宽统计信息的 MS SQL 数据库。我们有一个原始数据表,为了提高不同深入级别的报告速度,我们每小时、每天和每周汇总和汇总数据到单独的表中。

Mongo 或 Raven 等 NoSQL 数据库是否适合此类应用程序?

I have a MS SQL database that's used to capture bandwidth stats. We have a raw data table and to improve reporting speed at different drill-down levels we aggregate and rollup data on an hourly, daily and weekly basis to separate tables.

Would a NoSQL database such as Mongo or Raven be a good candidate for this type of application?

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

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

发布评论

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

评论(1

神仙妹妹 2024-10-20 11:41:42

不同的 NoSQL 解决方案针对不同的用途解决不同的问题 - 因此,首先最好的做法是查看您的问题并将其分解

  • 您正在大量写入存储,因此写入速度对您来说很重要
  • 您想要对数据执行聚合操作并获得易于查询的结果
  • 从听起来来看,读取速度并不是那么重要,至少在“Web 应用程序必须真正响应数百万人”的方式中不是
  • 这样不知道是否需要动态查询

让我们以非常高的水平、通用的方式来看看 Couch、Mongo 和 Raven

Raven

  • 快速写入
  • 快速查询(最终一致、预先计算、通过映射聚合/reduce)
  • 动态查询是可能的,但并不真正适合您的用例,因为您很可能会按日期等进行查询

Mongo

  • 盲目快速写入(在我看来这是危险的,因为断电意味着丢失数据;-))
  • 读取速度较慢(相对),通过映射/归约进行聚合,而不是预先计算
  • 动态查询就是您要做的事情,但是如果您希望在此类查询上获得任何性能,您可能必须在列上定义索引数据

Couch

  • 快速写入
  • 快速读取(预先计算,但仅在读取时更新 (IIRC)
  • 不可能进行动态查询,所有数据均通过映射或映射/缩减函数预定义

所以,基本上 - 执行您需要对此类数据进行动态查询吗?阅读速度对您来说非常重要吗?如果你需要动态查询,那么你会需要 Raven 或 Mongo(对于这种事情,Couch 可能不是你想要的)。

FWIW,我认为 Mongo 唯一的用例是用于日志记录,所以你可能会有答案。

Different NoSQL solutions solve different problems for different uses - so first off the best thing to do is look at your problem and break it down

  • You are writing heavily to storage, therefore write speed is important to you
  • You want to perform aggregation operations on that data and have the results of that easily queryable
  • Read speed isn't that important from the sound of things, at least not in an "web application has to be really responsive for millions of people" kind of way
  • I don't know if you need dynamic queries or not

Let's look at Couch, Mongo and Raven in a very high level, generalised way

Raven

  • Fast writes
  • Fast queries (eventually consistent, pre-computed, aggregation via map/reduce)
  • Dynamic queries possible, but not really appropriate to your use case, as you're most likely going to be querying by date etc

Mongo

  • Blindingly Fast writes (In my opinion dangerously, because power going off means losing data ;-))
  • Slow reads (relatively), aggregation via map/reduce, not pre-computed
  • Dynamic queries are just what_you_do, but you probably have to define indexes on your columns if you want any sort of performance on this sort of data

Couch

  • Fast writes
  • Fast-ish reads (Pre-computed, but updated only when you read (IIRC)
  • Dynamic queries not possible, all pre-defined via map or map/reduce functions

So, basically - do you need dynamic queries over this sort of data? Is the read speed incredibly important to you? If you need dynamic queries then you'll want Raven or Mongo (For this sort of thing Couch is probably not what you are looking for anyway).

FWIW, Mongo's only use case in my opinion IS for logging, so you might have an anwer there.

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