Search Results

Search found 7551 results on 303 pages for 'pre optimization'.

Page 17/303 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Possible SWITCH Optimization in DAX – #powerpivot #dax #tabular

    - by Marco Russo (SQLBI)
    In one of the Advanced DAX Workshop I taught this year, I had an interesting discussion about how to optimize a SWITCH statement (which could be frequently used checking a slicer, like in the Parameter Table pattern). Let’s start with the problem. What happen when you have such a statement? Sales :=     SWITCH (         VALUES ( Period[Period] ),         "Current", [Internet Total Sales],         "MTD", [MTD Sales],         "QTD", [QTD Sales],         "YTD", [YTD Sales],          BLANK ()     ) The SWITCH statement is in reality just syntax sugar for a nested IF statement. When you place such a measure in a pivot table, for every cell of the pivot table the IF options are evaluated. In order to optimize performance, the DAX engine usually does not compute cell-by-cell, but tries to compute the values in bulk-mode. However, if a measure contains an IF statement, every cell might have a different execution path, so the current implementation might evaluate all the possible IF branches in bulk-mode, so that for every cell the result from one of the branches will be already available in a pre-calculated dataset. The price for that could be high. If you consider the previous Sales measure, the YTD Sales measure could be evaluated for all the cells where it’s not required, and also when YTD is not selected at all in a Pivot Table. The actual optimization made by the DAX engine could be different in every build, and I expect newer builds of Tabular and Power Pivot to be better than older ones. However, we still don’t live in an ideal world, so it could be better trying to help the engine finding a better execution plan. One student (Niek de Wit) proposed this approach: Selection := IF (     HASONEVALUE ( Period[Period] ),     VALUES ( Period[Period] ) ) Sales := CALCULATE (     [Internet Total Sales],     FILTER (         VALUES ( 'Internet Sales'[Order Quantity] ),         'Internet Sales'[Order Quantity]             = IF (                 [Selection] = "Current",                 'Internet Sales'[Order Quantity],                 -1             )     ) )     + CALCULATE (         [MTD Sales],         FILTER (             VALUES ( 'Internet Sales'[Order Quantity] ),             'Internet Sales'[Order Quantity]                 = IF (                     [Selection] = "MTD",                     'Internet Sales'[Order Quantity],                     -1                 )         )     )     + CALCULATE (         [QTD Sales],         FILTER (             VALUES ( 'Internet Sales'[Order Quantity] ),             'Internet Sales'[Order Quantity]                 = IF (                     [Selection] = "QTD",                     'Internet Sales'[Order Quantity],                     -1                 )         )     )     + CALCULATE (         [YTD Sales],         FILTER (             VALUES ( 'Internet Sales'[Order Quantity] ),             'Internet Sales'[Order Quantity]                 = IF (                     [Selection] = "YTD",                     'Internet Sales'[Order Quantity],                     -1                 )         )     ) At first sight, you might think it’s impossible that this approach could be faster. However, if you examine with the profiler what happens, there is a different story. Every original IF’s execution branch is now a separate CALCULATE statement, which applies a filter that does not execute the required measure calculation if the result of the FILTER is empty. I used the ‘Internet Sales’[Order Quantity] column in this example just because in Adventure Works it has only one value (every row has 1): in the real world, you should use a column that has a very low number of distinct values, or use a column that has always the same value for every row (so it will be compressed very well!). Because the value –1 is never used in this column, the IF comparison in the filter discharge all the values iterated in the filter if the selection does not match with the desired value. I hope to have time in the future to write a longer article about this optimization technique, but in the meantime I’ve seen this optimization has been useful in many other implementations. Please write your feedback if you find scenarios (in both Power Pivot and Tabular) where you obtain performance improvements using this technique!

    Read the article

  • Cheap Search Engine Optimization

    Is it really worth it to invest in search engine optimization? I am sure that you are well aware of the advantages and disadvantages of being optimized for search engine results. But just how much should one be willing to pay for being optimized?

    Read the article

  • Search Engine Optimization Tips For Your Blog

    No longer is Search Engine Optimization (SEO) limited to websites. This process of improving both quantity and quality of traffic is also available for your blog. It produces a natural or organic flow of search engine results and helps your blog move up in ranking. Here are some things that will help improve your SEO.

    Read the article

  • Leveraging Search Engine Optimization

    More and more companies are strengthening their online presence by using a combination of online and offline marketing tools and techniques. Search engine optimization, presence on social media as well as YouTube and MySpace promotions can serve as powerful tools in your website marketing arsenal.

    Read the article

  • 3 Easy Rules For Keyword Optimization

    Keyword optimization is one of the most basic tactics you have to attract free search engine traffic. Even if you are not too familiar with keyword SEO it is way too easy to learn and way too valuable to your business to overlook. It all starts with developing a keyword list and then properly using them in a way that will help increase your website traffic.

    Read the article

  • Search Engine Optimization For Beginners - How to Write Search Engine Friendly Articles

    If you're planning to implement Search Engine Optimization as an Internet Marketing strategy to boost your site's online coverage then you need to focus one of the most important steps to produce quality results -- writing content. There is more to writing articles or Web content than just stuffing it full of keywords just to make it easy for search engine to find your page and put you on top. There are certain rules to be followed in order for this to be an effective strategy for your SEO.

    Read the article

  • Search Engine Optimization and Article Promoting

    Search results optimization and page marketing and advertising need to go hand in hand if you can be planning to have a prosperous report marketing and advertising campaign. Your interest to detail and discovering just the proper key phrases are critical, but so is mastering how to make use of them adequately.

    Read the article

  • Blog Optimization

    Search engine optimization is the process done to generate traffic through search engines. It became a need for websites because 80%-90% of visitors come from major search engines. Higher rankings me... [Author: Victoria Phee - Computers and Internet - August 31, 2009]

    Read the article

  • Search Engine Optimization - What to Do With Your SEO Visitors When They Come to Your Website

    When it comes to making money from your search engine optimization efforts you have to make sure you are focused on getting your SEO traffic to actually buy what you are selling. Most people are so concerned with getting more visitors to their site that they forget about the fact that you have to get them to buy something in order to make money. In this article I want to show you exactly how to get your visitors to buy when they come to your site.

    Read the article

  • Getting Inbound Links From a Professional Search Engine Optimization Company

    Getting a professional search engine optimization company to help with link building is something that everyone should do at some point if they have a website. There are many types of links used in link building strategies. Among the commonly used ones are inbound links and reciprocal links. Of the two, emphasis is often placed on inbound links by webmasters and website owners who use strategies without spending a penny.

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >