处理SQL Server Analysis Services中的大型结果集

时间:2022-10-28 22:37:08

I have a Database that contains data about articles,structures and manufacturers. Meaning an article is linked to 1 manufacturer and to N structure-nodes (think as article-classification-nodes).

我有一个数据库,其中包含有关文章,结构和制造商的数据。意味着文章链接到1个制造商和N个结构节点(视为文章分类节点)。

Querying articles using T-SQL with a lot of conditions is currently too slow to be usable for an e-shop, even with good hardware and properly indexed tables. (Should be below 1 sec). Now I wonder if it would make sense to access this data through an OLAP Cube. I already developed one to get aggregations, like: How many articles of manufacturer X exist below node Y recursively?

使用具有许多条件的T-SQL查询文章目前太慢而无法用于电子商店,即使使用良好的硬件和正确索引的表也是如此。 (应低于1秒)。现在我想知道通过OLAP Cube访问这些数据是否有意义。我已经开发了一个聚合,例如:递归地在节点Y下面存在多少制造商X的文章?

These aggregations are pretty fast, now I wonder if it makes sense to also retrieve whole article-result sets through Cubes. Meaning: Give me every single article ID of manufacturer X that exist below node Y recursively. Because the result sets can be quite large, the query takes even longer..

这些聚合非常快,现在我想知道是否通过Cubes检索整个文章结果集是否有意义。含义:递归地给出节点Y下面存在的制造商X的每个文章ID。因为结果集可能非常大,查询需要更长的时间..

Therefore my question, is there a way to deal with large result sets in SSAS, or is this totally the wrong direction I am taking?

因此,我的问题是,有没有办法处理SSAS中的大型结果集,或者这是我正在采取的错误方向?

1 个解决方案

#1


You can definitely deal with large sets of data and make them perform decently in SSAS by leveraging Aggregations. Of course, if you're going over the wire, that's still a lot of data to move, so keep that in mind. Your query will return quickly; the results will take a while to transfer.

您绝对可以处理大量数据,并通过利用聚合使它们在SSAS中表现得相当不错。当然,如果你要通过电线,那仍然需要移动大量数据,所以请记住这一点。您的查询将快速返回;结果将需要一段时间才能转移。

The real power of SSAS is being able to be targeted in your approach. Instead of saying "Give me everything," we can start out at a high level, drill down, find the level we want, and continue drilling down, down, down until you get to the data that you really want.

SSAS的真正力量可以成为您的方法的目标。我们可以从高层开始,向下钻取,找到我们想要的水平,然后继续深入,向下,向下钻取,直到找到您真正想要的数据,而不是说“给我一切”。

#1


You can definitely deal with large sets of data and make them perform decently in SSAS by leveraging Aggregations. Of course, if you're going over the wire, that's still a lot of data to move, so keep that in mind. Your query will return quickly; the results will take a while to transfer.

您绝对可以处理大量数据,并通过利用聚合使它们在SSAS中表现得相当不错。当然,如果你要通过电线,那仍然需要移动大量数据,所以请记住这一点。您的查询将快速返回;结果将需要一段时间才能转移。

The real power of SSAS is being able to be targeted in your approach. Instead of saying "Give me everything," we can start out at a high level, drill down, find the level we want, and continue drilling down, down, down until you get to the data that you really want.

SSAS的真正力量可以成为您的方法的目标。我们可以从高层开始,向下钻取,找到我们想要的水平,然后继续深入,向下,向下钻取,直到找到您真正想要的数据,而不是说“给我一切”。