SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • Training
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Performance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
SQL Azure
Developer
General DBA
ASP.NET / ADO.NET
SQL Azure

USEFUL SITES :

ASP.NET Tutorials
Windows and SQL Azure Tutorials
Cloud Hosting Magazine
SharePoint Tutorials
Windows Server Help

Write for Us

Share your SQL Server knowledge with others and raise your profile in the community More...
Latest Articles

A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server - Part ...
A High Level Comparison Between Oracle and SQL Server

More     
 
Latest FAQ's

Add Node to A SQL Server failover Cluster failed with invalid ...
SQL Server Destination remote server error
Setting Up Data And Log Files For SQL Server
Will Check Constraints Improve Database Performance?

More     
   
Latest Software Reviews

dbForge Review
Spotlight on ApexSQL Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Data Diff - Server-based database comparison tool ...
Spotlight on ApexSQL Doc 2008

More     

articles >> business intelligence >> Optimizing Microsoft SQL Server Analysis Services: MDX ...

Optimizing Microsoft SQL Server Analysis Services: MDX Optimization Techniques: Caching and Additional Techniques

By : William E. Pearson, III
Apr 18, 2004

Introduction and Scope


In this article, we will continue our examination of MDX optimization techniques, begun in the article prior to the last, MDX Optimization Techniques: Introduction and the Role of Processing, and continued in the last article, MDX Optimization Techniques: Further Control of Processing Location and Expression Arrangement. In both articles, we focused upon control of location as a primary type of tuning interaction for MDX query optimization. We performed practice exercises to reinforce the concepts exposed, and then extended our considerations of additional tuning interaction types to include the optimization of set operations and syntax arrangement considerations. Within our exploration of the optimization of set operations, we undertook practice examples that illustrated some ways (additional tuning interaction types) whereby we can rearrange queries to enhance performance, often significantly.


In this article, we will expose methods of caching to load a commonly used slice of a cube into memory, for faster retrieval in prospective operations. Our discussion of caching as another tuning interaction type will include various aspects of cache creation, and uses of caching within MDX. In addition, we will touch upon other performance enhancement options, including external functions and cube design modifications and augmentation.

Optimizing Performance Through Caching


When queries are not well underpinned by aggregates, processing suffers. Extra effort has to be expended to compensate for the missing accumulations. We can often enhance performance by creating and caching the appropriate aggregates in memory. Caching is a feature that MDX provides to improve performance; caching affords us the capability of loading a commonly used slice of a cube into memory, “caching” it for faster retrieval by our queries.


Analysis Services and the PivotTable Service automatically cache query definitions, data, and meta data on the server and client sides, respectively. Caching increases performance in those cases where queries are repeatedly requesting the same data or meta data, reducing network traffic or execution time. The ability to create caches for data that we specify in MDX gives us another means of fine-tuning query performance; through this capability we realize a great degree of control over the caching of data for which we expect there to be a recurring need.
 

In terms of creation scope, caches are analogous to named sets: we can create a cache for the lifetime of a single query, or limit its life to a session. To create a cache to be used at the session level, the CREATE CACHE statement can be used. The CREATE CACHE statement can be used to create caches at the query level, but the WITH statement, with which we are now somewhat familiar, can perform this task just as easily, and is more frequently used for this purpose.
 

Let’s take a look at the use of the WITH statement to create a cache in an MDX query. First, we’ll call the MDX Sample Application, with which we have become familiar in previous articles, as a platform from which to perform our practice exercises.
 

1. Start the MDX Sample Application.
 

We are initially greeted by the Connect dialog, shown in Figure 1.
 


 

Figure 1: The Connect Dialog for the MDX Sample Application
 

The illustration above depicts the name of my server, MOTHER1, and properly indicates that we will be connecting via the MSOLAP provider (the default).
 

2. Click OK.
 

The MDX Sample Application window appears.
 

3. Clear the top area (the Query pane) of any remnants of queries that might appear.
 

4. Ensure that FoodMart 2000 is selected as the database name in the DB box of the toolbar.
 

5. Select the Warehouse cube in the Cube drop-down list box.
 

The MDX Sample Application window should resemble that depicted in Figure 2, complete with the information from the Warehouse cube displaying in the Metadata tree (left section of the Metadata pane).
 


 

Figure 2: The MDX Sample Application Window (Compressed View)
 


    Next Page>>    








C# Help and Tutorials | PHP MySQL Tutorial | Sharepoint Tutorial | Azure Tutorial | Cloud Hosting Magazine | ASP.NET Tutorials | Windows Server Help | Windows Phone Pro | Silverlight Ace | Visual Studio Tutorials | Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | SQL Server Training Videos | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views


              © 2010 Jude O'Kelly. All rights reserved