MDX-NON EMPTY功能更快吗? [英] MDX - NON EMPTY function faster?
问题描述
我当时假设必须尽可能避免使用NON EMPTY
子句.因此,当我偶然发现它实际上使查询变得更快时,我感到震惊!
I was under the assumption that NON EMPTY
clause must be avoided whenever possible. So, I was in for a shock when I accidentally found that it actually made the query much faster!
对此进行采样:
select
[Measures].[Count Of Requests] on 0,
([Client].[Client Number].children , [Date].[Year].children) on 1
from [MyCube]
-19秒(在热缓存上)
--19 seconds on a hot cache
select
[Measures].[Count Of Requests] on 0,
non empty ([Client].[Client Number].children , [Date].[Year].children) on 1
from [MyCube]
冷缓存上
-5秒(持续)
--5 seconds on a cold cache(Consistently)
NON EMPTY
不是递归的吗?是因为本地缓存大小吗?
Isn't NON EMPTY
recursive? Is it because of local cache size?
推荐答案
给我的印象是,在脚本过程的最后就应用了NON EMPTY
.在此处查看上一个问题/答案:
处理MDX查询的逻辑顺序
I was under the impression thatNON EMPTY
is applied at the very end of the script's process. See previous question/answer here:
Logical order an MDX query is processed
因此有效地返回了所有内容,然后在将结果呈现到网格或客户端应用程序之前,NON EMPTY
指令意味着将丢弃行或列上的空元组.
So effectively everything is returned and then before rendering results to grid or client application the NON EMPTY
instruction means that null tuples on either rows or columns are discarded.
如果您的第一个脚本返回了大量数据,那么渲染过程是否需要花费额外的时间来完成?
If your first script is returning a lot of data then does it take the extra time for the render process to complete?
另一篇有趣的文章重新. NON EMPTY
在这里:
http://www.bidn.com/blogs/DustinRyan/bidn-blog/2996/non-empty-vs-nonempty-to-the-death
Another interesting article re. NON EMPTY
is here:
http://www.bidn.com/blogs/DustinRyan/bidn-blog/2996/non-empty-vs-nonempty-to-the-death
这篇关于MDX-NON EMPTY功能更快吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!