This project has moved and is read-only. For the latest updates, please go here.

2nd evaluation of same measure within DAX Studio always a few seconds shorter. Which time is acurate?

Jun 23, 2015 at 7:16 AM
I'm trying to optimise my measures by checking the time it takes to evaluate within DAX Studio. But I noticed that if I evaluate a measure I get one execution time, if I immediately evaluate it again, the execution time is always a good few seconds shorter.

So which is the true benchmark that tells me how long my measures will take to load for my end-users?
Jun 23, 2015 at 7:39 AM
Both are accurate. You are most likely seeing the difference between a cold and warm cache. If you have admin rights on the server you are testing against you should be able to click on the "clear cache" button in between the queries and get more consistent results.

You are best to do your tuning against an empty cache (the first duration) as tabular servers do very little cache sharing between sessions, so the majority of queries will not see much caching behaviour, it's mainly when you run the identical query twice in quick succession that you see it answered from the Formula Engine cache.

Again, if you have admin rights on the server, the "Server Timings" feature in DAX Studio will give you the times in milliseconds that it took to evaluate the query on the server side. This is more accurate than the timing in the output window as that includes client side processing and network transfer time.
Jun 23, 2015 at 7:43 AM
Thanks for replying. I should have said, this is on PowerPivot model not Tabular (so Server timings option is greyed out and clicking Clear Cache always crashes the workbook). I did think a cache is involved. It's a bit of a nuisance closing and restarting the workbook all the time but I noticed that if I evaluate another measure and then re-evaluate the original one, that resets the cache.

Jun 23, 2015 at 8:40 AM
OK, so I think I've fixed both those issues in v2.2 which will be released very soon.