Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

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


Article Topics

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

Write for Us

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

How Change Data Capture Can be Used
Characterizing I/O Workload
Server Audit Specifications in SQL Server 2008
Server and Database Auditing in SQL Server 2008

More     
 
Latest FAQ's

ALTER TABLE SWITCH statement failed because table '%.*ls' has %d columns ...
SQL Server Reporting Server (SSRS) service is failing to start ...
Cannot Start SQL Server Service
Users are able to connect to report manager but not able ...

More     
   
Latest Software Reviews

Spotlight on ApexSQL Doc 2008
ApexSQL Enforce
Embarcadero Change Manager
SQL Server DBA Dashboard

More     

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

Optimizing Microsoft SQL Server Analysis Services: MDX Optimization Techniques: Optimizing NON EMPTY

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

Page 3 / 3


The Calculated Member Builder opens. We see the expression that determines the value of the Employee Salary calculated member in the Value expression box. Part of the value is the Org Salary measure, as depicted in Figure 7.




Figure 7: The Org Salary Measure is Part of the Value Expression


We have determined that the Org Salary measure is directly associated with the Employee Salary calculated member. We will put this information to use in the next steps.


12. Click OK to close the Calculated Member Builder.


13. Click the Non Empty Behavior property, just above the Value property, on the Properties pane – Basic tab.


14. Select Org Salary in the drop-down selector to the right of the Non Empty Behavior property label.


The Non Empty Behavior property, with new setting, appears as shown in Figure 9.


 



Figure 8: Non Empty Behavior Property Setting


Org Salary, as we saw in the Calculated Member Builder, is the base measure of the calculated member. Setting the Non Empty Behavior property to the base measure optimizes a query that applies the NON EMPTY keyword to this calculated member. This works because we are telling Analysis Services, with this setting, that, when it encounters the Employee Salary calculated member in a query that uses the NON EMPTY keyword on the same axis, it is not to evaluate the member, but it is, instead, to look to the referenced measure. If it determines the base measure Org Salary to be empty, it is to consider the calculated member empty automatically.


This makes sense in most scenarios (although not always), because if the base measure for a calculated member is empty, the calculated measure itself will typically be empty. Skipping the evaluation of the member means dramatic performance enhancement, in most cases.


15. Select File ---> Save to save changes to the cube as desired.


16. Select File ---> Exit to close the Cube Editor.


17. Exit Analysis Manager when ready.

Summary


In this article, we extended our performance enhancement toolset by adding a property setting for optimizing our MDX queries. We discussed the use of NON EMPTY in our queries in general, commenting on its usefulness in rendering more user-friendly presentations of datasets. We then exposed the cause for the performance degradation that can occur when we apply this popular keyword in a query axis involving a calculated member.


We then performed a hands-on exercise where we set the Non Empty Behavior property for a calculated measure we selected from the HR cube of the sample FoodMart 2000 database that accompanies the installation of MSAS. Finally, we commented upon the operation of the property setting, explaining how it works to eliminate the overhead that otherwise accrues within the context of the NON EMPTY keyword / calculated member combination.


Throughout our Optimizing MSSQL Server Analysis Services series, we will continue to add new MDX Optimization Techniques segments from time to time, on an ad-hoc basis. Many articles will involve a combination of MSAS settings and structural considerations (the property setting we have manipulated in this article is an excellent example) together with methods and strategies we can employ in MDX queries. Optimization of query performance is the objective, and the targeted audiences are developers and consumers alike.

I discover approaches to more efficient MDX, and enhanced MSAS structural strategies, daily, in my work with some of the largest companies in the world, as well as in my labs. The tools for developing powerful business intelligence and analysis capabilities have never been better. Bookmark this site as a place to check for a growing library of OLAP performance content in the months to come!


 

Copyright 2004 by the author.


<< Prev Page         








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | 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 | QDPMA Performance Tuning | 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


              © 1999-2008 by T10 Media. All rights reserved