views:

176

answers:

1

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).

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?

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..

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?

+1  A: 

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.

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.

Eric
Yes, but take things into account like sorting and paging: Assume the end-user on the UI selected one of the rather-top structure nodes, the result are 30'000 articles. Now I want to have them sorted by name and limited to only the first 100 (or 200-300, etc). There isn't really possible anymore..
driAn
Yes it is. No matter what frontend you use, you can limit the rowset, as well as use the ORDER function in MDX (most frontends have a button for this) to sort them. I'd argue that Top 10 lists are easier in SSAS than SQL. That being said, how well do you know MDX?
Eric
Well, the problem with TOP is, it performs bad if you want to grab articles 29'500 to 30'000, using T-SQL you can do all kind of tweaks to only fetch the 'rows page' you really need. How do you deal with that in MDX?I suck at MDX, that's why I look for opinions like yours.
driAn
You can use the Except to hide the rows above and below a certain index, and sorted however you'd like. All this being said, do we really need to be paging through 30,000 articles? I mean, who's going to be doing that? What information are they really looking for? Perhaps we can get them a more targeted approach.
Eric
The user will most likely navigate to the leaf nodes of the structure, when only < 100 articles are left, and then start paging through them. However we want to prive the same behavior when displaying the contents of parent/root nodes. Therefore the code must be capable of dealing with that load. So you suggest 'Except'? I'll take a look at this..
driAn