{"id":40,"date":"2008-01-29T21:43:57","date_gmt":"2008-01-30T02:43:57","guid":{"rendered":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/40_splitting-analysis-services-2005-cubes-based-on-measure-groups"},"modified":"2008-03-17T20:42:10","modified_gmt":"2008-03-18T01:42:10","slug":"splitting-analysis-services-2005-cubes-based-on-measure-groups","status":"publish","type":"post","link":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/40_splitting-analysis-services-2005-cubes-based-on-measure-groups","title":{"rendered":"Splitting Analysis Services 2005 cubes based on measure groups"},"content":{"rendered":"<p>When\u00a0I initially migrated Analysis Services\u00a0database from 2000 to 2005 version, in the new database\u00a0I\u00a0created single\u00a0cube with all measure groups\u00a0in it. At the time I believed that was a right way to do. This is quote from one of my favorite\u00a0books &#8220;The Microsoft Data Warehouse Toolkit with SQL Server 2005 and the Microsoft Business Intelligence Toolset&#8221; page 322, chapter 7:<\/p>\n<blockquote><p>&#8220;The best practice in Analysis Services\u00a0 2005 is to define a single cube for a database&#8221;&#8230; &#8221; You are still permitted to create multiple cubes in a database, but you shouldn&#8217;t&#8221;. Instead, create a single cube with multiple measure groups.&#8221;<\/p><\/blockquote>\n<p>But later I found about Microsoft\u00a0recommendation &#8220;Avoid having more than 15 measure groups in cube&#8221;. I posted question on <a target=\"_blank\" href=\"http:\/\/forums.microsoft.com\/MSDN\/ShowPost.aspx?PostID=1393231&amp;SiteID=1\">Analysis Services MSDN forum<\/a> and got reply from <a target=\"_blank\" href=\"http:\/\/artisconsulting.com\/Blog\/GregGalloway\">Greg Galloway<\/a> about his experience &#8211; about 15% performance boost after splitting and about 10% performance improvement after reducing cubes MDX script code.<\/p>\n<p><!--more--><\/p>\n<p>This post is about my experience in this area, as I finally\u00a0spent some time splitting SSAS cubes with many measure groups into multiple cubes. This specific performance test was done on the cube that had 23 measure groups originally and was split into 11\u00a0cubes with 1-3 measure groups in each. Cube size was about 6GB (sample data set) and size sum of smaller cubes did not change much after restructuring. Original big cube had about\u00a02600 lines of\u00a0MDX script. After I split cube into smaller cubes, cube MDX script size went down to 350-1100 lines per cube. There is a big chunk of code related to time intelligence functionality that I had to repeat in each cube.\u00a0\u00a0<\/p>\n<p>Here are\u00a0notes from my tests:<\/p>\n<ul>\n<li>After splitting cubes, I saw consistently about 20-30% improvement on most queries from the\u00a0larger measure groups.<\/li>\n<li>Smaller cubes had bigger performance improvement after they were split off from the big cube. On the smaller cubes I saw performance improved by as much as 100-300%.<\/li>\n<li>I used linked measure groups to access measures from different cube. That worked great and it is very easy to setup. For queries that use calculations based on linked measure groups I saw inconsistent performance behaviour. Some of the queries were 20-30% faster after the split, but few others where 10-20% slower.<\/li>\n<li>There is a known bug related to linked measure groups described in this KB article: <a target=\"_blank\" href=\"http:\/\/support.microsoft.com\/kb\/940160\/\">http:\/\/support.microsoft.com\/kb\/940160\/<\/a>. I had problems kind of related to this bug. But in my case\u00a0excluding cubes from the project and then adding them back in different order fixed this problem.<\/li>\n<li>After splitting cubes I enjoyed the fact that related MDX scripts got smaller and it was easier to find code associated with specific measure groups.\u00a0\u00a0<\/li>\n<li>One thing that I do not like about cube split was the fact that I have to repeat the same time intelligence related code in each cube.\u00a0It is going to be more difficult to maintain that code from now on.<\/li>\n<\/ul>\n<p>So,\u00a0it was definitely worth doing this restructuring and if you have cubes with many measure groups, consider splitting them.<\/p>\n<p>For performance testing I used beta tool <a target=\"_blank\" href=\"http:\/\/www.ssas-info.com\/forum\/MDXStudio\">MDX Studio<\/a>(by Mosha Pasumansky) and found it to be very helpful.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When\u00a0I initially migrated Analysis Services\u00a0database from 2000 to 2005 version, in the new database\u00a0I\u00a0created single\u00a0cube with all measure groups\u00a0in it. At the time I believed that was a right way to do. This is quote from one of my favorite\u00a0books &#8220;The Microsoft Data Warehouse Toolkit with SQL Server 2005 and the Microsoft Business Intelligence Toolset&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts\/40"}],"collection":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ssas-info.com\/VidasMatelisBlog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}