LookUpCube Function MDX Query Performance Test

March 18, 2018 | Author: OluwatobiAdewale | Category: Cpu Cache, Microsoft Sql Server, Technology, Computing, Software


Comments



Description

LookUpCube Function MDX QueryPerformance Test Who is online? 0 guests and 1 members Member login | Become a member -- search • Home • Articles • Forums • Blogs • Jobs • Events • Files • Spaces • People • login • register • Home » Blogs » DustinRyan » LookUpCube Function MDX Query Performance Test LookUpCube Function MDX Query Performance Test change text size: A A A • Comments (4) • • posted 7/7/2010 by DustinRyan - Views: [9336] In my previous blog post, I mentioned that there was a performance cost for using the LookUpCube function. Well recently a coworker asked me just home much of a performance hit was the LookUpCube function going to cause. So I decided to conduct a test. I wrote two simple MDX queries (one using the LookUpCube function and one not), then executed the queries (6 times each: 3 w/ cold cache and 3 w/ warm cache) while running SQL Server Profiler and compared the duration times of the query. Print Page 1 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa...   Here are the two queries: With the LookUpCube function: WITH MEMBER [Measures].[Lookup Internet Order Count] AS LOOKUPCUBE("Mined Customers", "([Measures].[Internet Order Count], [Customer].[Customer Geography].[Country].&[" + [Customer].[Customer Geography].CurrentMember.Name + "])") SELECT [Customer].[Customer Geography].[Country] on COLUMNS, {[Measures].[Internet Sales Amount], [Measures].[Lookup Internet Order Count]} ON ROWS FROM [ADVENTURE WORKS] Without the LookUpCube function: SELECT [Customer].[Customer Geography].[Country] on COLUMNS, {[Measures].[Internet Sales Amount], [Measures].[Internet Order Count]} ON ROWS FROM [ADVENTURE WORKS] And here are the results: Cold Cache: LookUpCube Function: 17ms, 14ms, 15ms Average: 15.33 ms No LookUpCube Function: 12ms, 12ms, 14ms Average: 12.67 ms Warm Cache: LookUpCube Function: 15ms, 14ms, 15ms Average: 14.67 ms No LookUpCube Function: 13ms, 12ms, 12ms Average: 12.33 ms As you can see, the query without the LookUpCube function performed significantly faster. With a cold cache, the query without the LookUpCube function was more than 17% faster and with a warm cache, the query without the LookUpCube function was almsot 16% faster. I think these results speak volumes, especially considering the fact that the queries were very simple. Imagine if you were using the LookUpCube function in a calculated measure that was performing some more complex calculations. As I said before in my previous post, if you are using the LookUpCube function in a very simple report with a simple query, you'll probably be fine. But if you are using the LookUpCube function in a calculated measure in a cube that gets a lot of traffic, you should start thinking about redesigning your solution. Page 2 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa... I hope someone found this information useful. Please feel free to post any comments or questions. Thanks! tags : LookUpCube Function, MDX query performance 0 /5 Avg: 0/5: (0 votes) Comments (4) mikedavis said: Good post 7/7/2010 · Comment furmangg said: Dustin- Your test is only retrieving a couple of cells, so it's not surprising that the times aren't that different. However, compare the difference on the following queries, and you'll see the drastic hit to performance that LookupCube makes. The first query was still running after 5 minutes, whereas the second query completed in 9 seconds. WITH MEMBER [Measures].[Lookup Internet Order Count] AS LOOKUPCUBE("Mined Customers", "([Measures].[Internet Order Count], [Customer].[Customer Geography].[Country].&[" + [Customer]. [Customer Geography].CurrentMember.Name + "])") SELECT NON EMPTY [Customer].[Customer Geography].[Country].Members * [Date].[Date].[Date].Members * [Product].[Product].[Product].Members on COLUMNS, {[Measures].[Internet Sales Amount], [Measures].[Lookup Internet Order Count]} ON ROWS FROM [ADVENTURE WORKS] SELECT NON EMPTY [Customer].[Customer Geography].[Country].Members * [Date].[Date].[Date].Members Page 3 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa... * [Product].[Product].[Product].Members on COLUMNS, {[Measures].[Internet Sales Amount], [Measures].[Internet Order Count]} ON ROWS FROM [ADVENTURE WORKS] 7/8/2010 · Comment dustinryan said: Well like I said, a near 20% speed increase in such a simple query is significant and like I also said, a more complex query would further increase the performance hit. Good example. 7/8/2010 · Comment jason143 said: Thanks for bringing this topic up Dustin, I always knew there was going to be a performance hit but usually had to blabber something when someone asked how much. I guess your example along with Greg's explanation answers this for me :) 7/12/2010 · Comment Add a new comment DustinRyan's latest blog posts • Do You Know Why Your MDX Query Is Slow? 24 days ago by DustinRyan • Page 4 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa... SSAS Lessons Learned: 29% Better Compression and 11% Better Query Performance 10/25/2013 by DustinRyan • BI Documenter Gets a Makeover With Doc xPress 8/30/2013 by DustinRyan • Building Your First Tabular Model Webinar Recording and Questionnaire Now Available 9/6/2013 by DustinRyan • Performance Tuning of Tabular Models in SSAS 2012 Whitepaper Now Available 8/6/2013 by DustinRyan Latest community blog posts • Upcoming Webinar – Creating Power Map Reporting Solutions 18 days ago by DevinKnight • Upcoming Webinar – Bringing Power BI Q&A to your Organization 18 days ago by DevinKnight • Introduction to Power BI Recording and Q&A 17 days ago by DevinKnight • T-SQL Window Function Performance webinar follow up 1/8/2014 by KathiKellenberger Page 5 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa... • My speaking schedule 2/20/2014 by KathiKellenberger Copyright © 2014 Axero Solutions LLC. Contact Us Business Intelligence Developer Network powered by Communifire ® Version 2.5.4240.2964 Choose your language: English Page 6 of 6 LookUpCube Function MDX Query Performance Test 4/1/2014 http://www.bidn.com/blogs/DustinRyan/ssis/814/lookupcube-function-mdx-query-performa...
Copyright © 2024 DOKUMEN.SITE Inc.