为什么使用 ROLAP 而不是普通的 MySQL?
与简单地查询 MySQL 数据库相比,在 MySQL 数据库之上使用 ROLAP 服务器(例如 Mondrian)是否有任何性能优势?
我问这个问题的背景是,我的大多数查询都相对简单(例如查找特定时期内的所有销售额),但数据库的大小相当大(数十万个条目)。
我的想法是使用 OLAP 来加速查询,但现在我很困惑这是否真的是这项技术的目的,特别是在 ROLAP 形式中。在尝试 olap4j API 时,我意识到我可以使用它来进行 MDX 查询,甚至不需要实际的 OLAP 服务器(只需一个关系数据库和一个 OLAP 模式)。这对性能有何用处?
谢谢
Are there any performance advantages in using a ROLAP server such as Mondrian on top of a MySQL database, as opposed to simply querying the MySQL database?
I am asking this in the context in which most of my queries will be relatively simple (such as finding all the sales in a certain period), but the size of the database is rather large (hundreds of thousands of entries).
My idea was to use OLAP to speed up queries, but now I'm confused as to whether or not this is actually the purpose of this technology, especially in its ROLAP form. While trying the olap4j API, I realized that I can use it to make MDX queries without even having an actual OLAP server (just having a relational database and an OLAP schema for it). How could that be of any use in terms of performance?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于您将如何使用它。
OLAP 是一个用于简化复杂数据分析的工具。如果您的查询是静态且简单的,则不要使用 ROLAP。这会增加不必要的开销。
另一方面,如果您需要为报告和商业智能进行复杂而详细的交互式数据分析,那么请务必使用 ROLAP。
更新:如果您需要 MySQL 的高性能 OLAP,您应该查看 MySQL 性能博客上的这篇文章,讨论各种方法和工具的性能差异。
It depends on how you're going to use it.
OLAP is a tool for simplifying complex data analysis. If your queries are static and simple, then don't use ROLAP. It would add unnecessary overhead.
On the other hand, if you need to do complex and detailed interactive data analysis for reporting and business intelligence, then by all means use ROLAP.
UPDATE: If you need high-performance OLAP for MySQL, you should take a look at this post on the MySQL performance blog for a discussion of the differences in performance of various approaches and tools.
OLAP 允许从多个维度分析数据;每个维度可能(如果不是总是)是一个“层次结构”(即树)。这使您可以在需要时从大局(高度聚合的数据)转到细节(向下钻取)。
此外,MDX 语言和/或计算度量的强大功能允许在纯 SQL 中执行复杂的查询,即使不是不可能,也是非常困难的。
OLAP allows for analysing your data in several dimensions; each dimension possibly (if not always) being a "hierarchy" (i.e., tree). This allows you for going from the big picture (highly aggregated data) to the details when required (drilldown).
In addition, the power of the MDX language and/or calculated measures allows for complex queries quite difficult if not impossible to do in pure SQL.