<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clay Lenhart's Blog &#187; SSAS</title>
	<atom:link href="http://clay.lenharts.net/blog/tag/ssas/feed/" rel="self" type="application/rss+xml" />
	<link>http://clay.lenharts.net/blog</link>
	<description>A blog on .Net and SQL Server</description>
	<lastBuildDate>Tue, 31 Oct 2017 10:34:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.2</generator>
	<item>
		<title>How SSAS Cube Processing Affects Running Queries</title>
		<link>http://clay.lenharts.net/blog/2009/05/29/how-ssas-cube-processing-affects-running-queries/</link>
		<comments>http://clay.lenharts.net/blog/2009/05/29/how-ssas-cube-processing-affects-running-queries/#comments</comments>
		<pubDate>Fri, 29 May 2009 19:26:55 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[SSAS]]></category>
		<category><![CDATA[cube processing]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/?p=119</guid>
		<description><![CDATA[SSAS cube processing can kill running queries.  That's right, it may kill queries in order to commit changes to the cube.  

Here is what happens during SSAS cube processing. <a href="http://clay.lenharts.net/blog/2009/05/29/how-ssas-cube-processing-affects-running-queries/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>SSAS cube processing can kill running queries.  That&#8217;s right, it may kill queries in order to commit changes to the cube.  </p>
<p>Here is what happens during SSAS cube processing.<span id="more-119"></span></p>
<ol>
<li>The cube finishes calculating the next version of the cube</li>
<li>Before the data can be made available, SSAS prevents new queries from running</li>
<li>Any currently running queries are allowed to finished normally for 30 seconds</li>
<li>After 30 seconds, SSAS kills any running queries</li>
<li>SSAS commits the new version and allows new queries to hit the updated data</li>
</ol>
<p>The 30 second time out is a configuration setting that you can read about <a href="http://geekswithblogs.net/darrengosbell/archive/2007/04/24/SSAS-Processing-ForceCommitTimeout-and-quotthe-operation-has-been-cancelledquot.aspx">here</a>.</p>
<p>So, that&#8217;s right, SSAS may kill long running queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2009/05/29/how-ssas-cube-processing-affects-running-queries/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>SSAS Beginner&#8217;s Guide: Storage Structure</title>
		<link>http://clay.lenharts.net/blog/2008/04/07/ssas-beginners-guide-storage-structure/</link>
		<comments>http://clay.lenharts.net/blog/2008/04/07/ssas-beginners-guide-storage-structure/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 20:19:31 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[SSAS]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/04/07/ssas-beginners-guide-storage-structure/</guid>
		<description><![CDATA[This is a second entry in a series on SQL Server Analysis Services (SSAS). To see the other blog entries on this tutorial, click on the SSAS Beginner’s Guide on the top bar. Relational Databases Let’s take a quick look &#8230; <a href="http://clay.lenharts.net/blog/2008/04/07/ssas-beginners-guide-storage-structure/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><em>This is a second entry in a series on SQL Server Analysis Services (SSAS). To see the other blog entries on this tutorial, click on the SSAS Beginner’s Guide on the top bar.</em></p>
<p><strong>Relational Databases</strong></p>
<p>Let’s take a quick look at a relational database table of football players:</p>
<p><img src="http://clay.lenharts.net/blog/images/ssasstorage_relational.png" alt="" width="398" height="188" /></p>
<p>The table is structured in rows and columns. Note that the column names are fixed – they are not based on the data. This is a difference between relational databases and SSAS databases.</p>
<p>SSAS databases are typically loaded from the relational database to the SSAS database and a copy of the data stored in a different form in the SSAS database. Once the data has been copied, you can delete the relational database (This assumes you are using the default MOLAP option).</p>
<p><strong>2 Dimensional SSAS Databases</strong></p>
<p>SSAS databases are stored in multidimensional structures. Below is an example of an SSAS database with just 2 dimensions. This contains fantasy football points, so the &#8220;2&#8221; in the first row and first column is the fantasy football points that Reina received during the 11/Aug/2007 game week.</p>
<p><img src="http://clay.lenharts.net/blog/images/ssasstorage_2D.png" alt="" width="478" height="271" /></p>
<p>The grey area contains two dimensions: Players and Game Weeks. Each column header (and row label) is called a <strong>dimension member</strong>. Example dimension members are &#8220;Carragher&#8221; and &#8220;03/11/2007&#8243;. These dimension members are similar to column names, however they are based on data.</p>
<p>Each number in a cell is at the <strong>intersection</strong> of two dimension members. Take for instance Gerrard’s first match where he received 10 points. It is stored at the intersection of</p>
<ul>
<li>&#8220;Gerrard&#8221;</li>
<li>and &#8220;11/08/2007&#8243;</li>
</ul>
<p>Gerrard and &#8220;11/08/2007&#8243; are <strong>coordinates</strong> to the cell containing 10. When you start writing MDX queries, you will try to find ways to reference these cells using coordinates.</p>
<p>The <strong>All Member</strong> aggregation is what is really useful in SSAS databases. It is a member that is added to each dimension when loading the data. The All Member cells are pre-calculated when loading the SSAS database data and are typically a sum. This member is physically stored and you can also query All Members just like any other member. The All Member aggregation above makes it easy to answer questions like, &#8220;What is the total number of points that Gerrard received?&#8221; The answer is found at the intersection of</p>
<ul>
<li>&#8220;Gerrard&#8221;</li>
<li>And the Game Week’s &#8220;All Member&#8221;.</li>
</ul>
<p>You can reference the All Members using the coordinate system just like any other member of the dimension.</p>
<p><strong>3 Dimensional SSAS Database</strong></p>
<p>Let’s take a look at a 3 dimensional SSAS database:</p>
<p><img src="http://clay.lenharts.net/blog/images/ssasstorage_3D.png" alt="" width="540" height="332" /></p>
<p>The diagram above shows most of the values stored in the 3 dimensional SSAS database. There are some values in the back of the cube that you can’t see without cutting the cube open, but they still exist.</p>
<p>The cube is shown so that the front pane is the same data as the two dimensional SSAS database above.</p>
<p>Just as a side note, although the diagram has two 10s on the cell for Gerrard on 11/08/2007, on the front in grey and on the top of the cell in white, the cell block itself only contains the number once. The cells can only contain one number and the numbers shown are for the 3D block, rather than a 2D pane. So the cell <img src="http://clay.lenharts.net/blog/images/ssasstorage_3D_onecell.png" alt="" width="124" height="55" /> contains just 17, even though 17 is shown three times.</p>
<p>The only difference with 3D cubes is that locating a cell requires 3 coordinates instead of 2:</p>
<ul>
<li>Game week</li>
<li>Player</li>
<li>Home/Away</li>
</ul>
<p>The 3<sup>rd</sup> dimension, Home/Away, gives us more information about the scores compared to the 2 dimensional database. If you wanted to know how many points these players received for all Away matches, you would go to the intersection of these three coordinates:</p>
<ul>
<li>Game week’s &#8220;All Member&#8221;</li>
<li>Player’s &#8220;All Member&#8221;</li>
<li>and Home/Away’s &#8220;Away&#8221; member</li>
</ul>
<p>Here you will find the value &#8220;155&#8221;.</p>
<p>The cube can answer other questions. Although you cannot see it in the diagram, the cube stores total points that Gerrard received at home. You would find it at the intersection of</p>
<ul>
<li>the game week’s &#8220;All Member&#8221;</li>
<li>&#8220;Gerrard&#8221;</li>
<li>&#8220;Home&#8221;.</li>
</ul>
<p>This value would be found on the bottom plane just to the left of the value 155.</p>
<p><strong>4 or More Dimensions</strong></p>
<p>There is really no limit to the number of dimensions you can create in your database even though it might be difficult to visualize. Let’s say you want to track sales for the following:</p>
<ul>
<li>the year 2007</li>
<li>the southeast region</li>
<li>the product &#8220;gizmo&#8221;</li>
<li>and the &#8220;Acme&#8221; store</li>
</ul>
<p>You may not be able to see how all the data is stored, however this scenario does have 4 dimensions.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/04/07/ssas-beginners-guide-storage-structure/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>SQL Server Analysis Services (SSAS) Series</title>
		<link>http://clay.lenharts.net/blog/2008/04/01/sql-server-analysis-services-ssas-series/</link>
		<comments>http://clay.lenharts.net/blog/2008/04/01/sql-server-analysis-services-ssas-series/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 12:34:55 +0000</pubDate>
		<dc:creator><![CDATA[Clay Lenhart]]></dc:creator>
				<category><![CDATA[SSAS]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://clay.lenharts.net/blog/2008/04/01/sql-server-analysis-services-ssas-series/</guid>
		<description><![CDATA[I am going to use this blog to convince a friend to use SQL Server Analysis Services (SSAS) in his projects because it makes it easier to write reports on as compared to relational databases. Part of the challenge is &#8230; <a href="http://clay.lenharts.net/blog/2008/04/01/sql-server-analysis-services-ssas-series/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I am going to use this blog to convince a friend to use SQL Server Analysis Services (SSAS) in his projects because it makes it easier to write reports on as compared to relational databases. Part of the challenge is that people don&#8217;t realize its advantages, and part is the large learning curve to use it.</p>
<p>This first post is on it advantages. Next will be a whole series to make it a bit easier to learn. First there are two main advantages for using SSAS.</p>
<p>You might have been attracted to article marketing because it enables you to take part in effectively advertising your site online via articles that you make and submit to internet publishers. Article marketing has a lot of facets and unique heights of skills to learn, but it&#8217;s doable and understandable to the majority of website owners, even ones who do not own a background in SEO (search engine optimization). Look through this page for details on <a href="https://flipboard.com/@toprated/best-personal-alarms---top-rated-personal-rape-alarms-of-2017-3d7rttq3y"><span style="color:#000000">personal alarm safety</span></a>.</p>
<p><strong>SSAS is fast even on a large volume of data</strong></p>
<p>Well, as long as the queries return few rows, and this really gets at the heart of when you want to use SSAS and when you don&#8217;t. It is good at returning a single sum for a column over a large number of rows, but is very slow at returning a lot of detailed rows. The reason for this is the totals (and the subtotals) are stored in the SSAS database. It takes more work to read all the original rows than the one single subtotal value. In fact, relational databases will be faster at returning detailed rows compared to SSAS.</p>
<p>Take for example the following SQL code from a relational database:</p>
<pre lang="sql">SELECT SUM(Cost)FROM Sales</pre>
<p>In SQL Server, this query could take a very long time as it scans the Sales table, however in SSAS the result comes back instantly because the one value is already pre-calculated and stored in the SSAS database.</p>
<p><strong>SSAS&#8217;s calculated measures are fast execution-wise and easy reusable</strong></p>
<p>In relational databases, calculation code can get messy. The main problem with SQL SELECT statements is that they make it difficult to write a calculation once, like in a function, and GROUP BY different ways. You might build a SELECT statement in a string and execute the string using sp_executesql, or you use a CASE statement to list the different SELECT statements that group differently. Both are messy compared to SSAS.</p>
<p>Calculated measures in SSAS give you a way to define the calculations in a straight forward manner that does not matter how you will group the data later. They also you another advantage in that they are defined centrally in the SSAS database, and the reports pick and choose the calculated measures they want. This moves formulas from many reports to the central SSAS database where they are tested once.</p>
<p>Between having one set of centralized &#8220;official&#8221; formulas, and having formulas written in clear straight forward manner, the reports will have fewer number of bugs.</p>
]]></content:encoded>
			<wfw:commentRss>http://clay.lenharts.net/blog/2008/04/01/sql-server-analysis-services-ssas-series/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>
