处理MDX查询的逻辑顺序 [英] Logical order an MDX query is processed

查看:101
本文介绍了处理MDX查询的逻辑顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MDX脚本中子句的求值顺序是什么?

What is the order of evaluation of the clauses within an MDX script?

WITH 
  MEMBER measures.A AS ...
  MEMBER measures.B AS ...
  SET S1 AS ...
SELECT 
  {
    measures.A
   ,measures.B
   ,measures.x
  } ON COLUMNS
  {S1} HAVING <condition> on ROWS
FROM [Cube]
WHERE ({S2})

  1. FROM
  2. WHERE
  3. WITH
  4. SELECT
  5. HAVING
  1. FROM
  2. WHERE
  3. WITH
  4. SELECT
  5. HAVING

?

但也许不是那么简单,因为MEMBERSET在上下文方面的处理方式有所不同-那么,如果此顺序正确,上下文如何关联?

But maybe not that simple as a MEMBER and a SET are dealt with differently in terms of context - so if this order is correct how does context tie in?

推荐答案

我会说:

  1. FROM(包括潜在的子选择)
  2. 在哪里
  3. SET和MEMBER在WITH子句中的位置
  4. 并行构建所有查询轴(列,行等)的元组列表,而忽略NON EMPTY和HAVING
  5. 所有轴交点的像元值
  6. 按照NON EMPTY和HAVING的要求从每个轴上删除元组.

在步骤3中,成员位置"是指该成员完全存在的信息,以及该成员在该层次结构中位于哪个层次结构以及可能位于哪个父级的信息.这不涉及成员定义表达式.将在第5步和第6步中进行评估.但是第4步需要该位置.

By "member location" in step 3, I mean the information that the member exists at all, and in which hierarchy and possibly under which parent it is located in the hierarchy. This does not involve the member definition expression. That will be evaluated in step 5 and 6. But the location is needed for step 4.

轴的并行求值意味着在查询处理中轴之间没有关系.

The parallel evaluation of the axes means that there is no relation between axes in the query processing.

还请注意,这是概念视图.从物理上讲,步骤6可能会在步骤4的处理过程中发生,或者优化器认为是正确的执行顺序,只要结果是相同的即可.

Also note that this is the conceptual view. Physically, step 6 may happen during the processing of step 4, or whatever the optimizer decides is a proper execution order, as long as the result would be the same.

这篇关于处理MDX查询的逻辑顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆