The cost of SSAS metadata management - Andrew Calvett

The cost of SSAS metadata management

Published 21 August 2009 06:45

This post will explain how we found ourselves in a situation where when processing a partition the metadata checks took 50 times longer than the actual partition and how to identify what time penalty you are incurring for the metadata checks.

The system i was investigating had around 80 cubes with around 100 partitions per cube all hosted in one database and we would add 1 partition per cube per day. The partitions in each cube were small but were taking far to long to process and as each day passed they would get a bit slower and inch their way that bit closer to breaking our SLA’s.

We know that too many partitions can hurt performance and this is documented in a SQLCat blog where it states “Partitions have some metadata and when the number exceeds several thousand, the cost of managing this metadata becomes apparent”.

To our detriment we had always believed that this would apply at the cube level since a partition can not be related to a partition in another cube. Wrong! When you process a partition SSAS will check for dependencies across every partition in the database. In our case this translated to checking for dependencies across > 8000 partitions and a processing delay of > 4 minutes!!! The actual processing itself only took a few seconds.

So, how do you work out the cost of metadata checking?

Start a profiler session and include command begin and progress reports. The first event after command begin will be Build Processing Schedule. The time difference between these two events is the “Cost of SSAS Metadata management”. In the screen shot below you can see the cost is 3 minutes 9 seconds.

image

So, now you have identified this overhead how do you address it? Unfortunately there is no magic bullet so the workarounds are below.

  • Reduce the number of partitions in the database through merging partitions or splitting into multiple databases.
  • You could move to SQL 2008 which does perform slightly better and reduces check time by about 25%. Still not good enough really……. (and yes that means you have a problem in 2005 & 2008)
  • Wait until Microsoft address the issue. Well its not currently going to be addressed for 2005 or 2008 but we might see it in 2008 R2.

I hope you find this helpful and if you are being hurt by this issue then let Microsoft know because then we might see it addressed sooner.  :)

Update

Since this problem is by design i have opened an improvement suggestion on Connect which you can find here. If you agree that Microsoft should implement a design change to improve performance please vote for for the connect item.

Comments

# SqlServerKudos said on 21 August 2009 17:13

Kudos for a great Sql Server article - Trackback from SqlServerKudos

# lqq said on 24 August 2009 11:09

Hi Andrew

We are just starting to build a big BI datamart so I'll keep an eye out for a growing number of partitions. I doubt it will by anything like the size you are encountering though.

I like the idea that these short blogs are the result of hours of analysis and goggling – and will hopefully save us from the same headaches you have had.

Thanks

Seth

# Andrew Calvett View Andrew Calvett's profile on LinkedIn said on 03 December 2010 23:49

I have spent the last few days working with SSAS 2008 R2 and noticed a few small enhancements which many

# samikane said on 23 February 2011 22:16

Here are this and some other articles on SSAS Metadata: <a href="ssas-wiki.com/.../Articles