根据MSDN,
表假脱机操作员扫描输入并将每一行的副本放在一个隐藏假脱机表中,该假脱机表存储在 tempdb 数据库中,并且仅在查询的生命周期内存在。
首先,在这一步之前的计划中没有任何输入......这个文字表明它应该和其他在线资源已经说了这么多。
假脱机操作员总是与另一个操作员一起使用。当它存储值时,它需要知道这些值是什么,因此它必须从另一个运算符接收它们。
其次,当悬停在输出列表中包含多个表时。所有这些都被假脱机到单独的桌子上吗?如果是这样,为什么不显示多个步骤?如果它们都被假脱机到一张桌子上,它们是否在假脱机之前被连接起来?如果你愿意的话,可以让表格“变平”。
第三,正如我在下面解释的那样,我认为我有 1 和 2 的答案......但现在我看到原始步骤的成本百分比为 0%,当该阀芯在另一个分支中重复使用时,成本百分比为 12%。为什么读回来比原来写出来的成本更高?
编辑:文本计划
StmtText
|--Compute Scalar(DEFINE:([so].[SLS_ORG_OPR_UNT_SRC_KEY]=[Expr1021], [so].[SLS_ORG_PROD_SRC_KEY]=[Expr1022], [cal].[WEEK_END_DATE]=[Expr1023], [so].[SLS_ORG_EMPL_SRC_KEY]=[Expr1024], [so].[SLS_ORG_JOBCODE]=[Expr1025]))
|--Hash Match(Inner Join, HASH:([Expr1021], [Expr1022], [Expr1023], [Expr1024], [Expr1025])=([Expr1016], [Expr1017], [Expr1018], [Expr1019], [Expr1020]), RESIDUAL:([Expr1016] = [Expr1021] AND [Expr1017] = [Expr1022] AND [Expr1018] = [Expr1023] AND [Expr1019] = [Expr1024] AND [Expr1020] = [Expr1025]))
|--Compute Scalar(DEFINE:([Expr1021]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_OPR_UNT_SRC_KEY] as [so].[SLS_ORG_OPR_UNT_SRC_KEY], [Expr1022]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_PROD_SRC_KEY] as [so].[SLS_ORG_PROD_SRC_KEY], [Expr1023]=[DMRPT].[dbo].[DIM_CALENDAR].[WEEK_END_DATE] as [cal].[WEEK_END_DATE], [Expr1024]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_EMPL_SRC_KEY] as [so].[SLS_ORG_EMPL_SRC_KEY], [Expr1025]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_JOBCODE] as [so].[SLS_ORG_JOBCODE]))
| |--Compute Scalar(DEFINE:([Expr1011]=CONVERT_IMPLICIT(int,[Expr1059],0)))
| |--Stream Aggregate(GROUP BY:([so].[SLS_ORG_OPR_UNT_SRC_KEY], [so].[SLS_ORG_PROD_SRC_KEY], [cal].[WEEK_END_DATE], [so].[SLS_ORG_EMPL_SRC_KEY], [so].[SLS_ORG_JOBCODE]) DEFINE:([Expr1059]=COUNT([Expr1015])))
| |--Sort(DISTINCT ORDER BY:([so].[SLS_ORG_OPR_UNT_SRC_KEY] ASC, [so].[SLS_ORG_PROD_SRC_KEY] ASC, [cal].[WEEK_END_DATE] ASC, [so].[SLS_ORG_EMPL_SRC_KEY] ASC, [so].[SLS_ORG_JOBCODE] ASC, [Expr1015] ASC))
| |--Table Spool
| |--Compute Scalar(DEFINE:([Expr1015]=[Expr1013]+[Expr1014]))
| |--Hash Match(Inner Join, HASH:([so].[SLS_ORG_GK])=([f].[SLS_ORG_GK]), RESIDUAL:([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[SLS_ORG_GK] as [f].[SLS_ORG_GK]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_GK] as [so].[SLS_ORG_GK]))
| |--Clustered Index Scan(OBJECT:([DMRPT].[dbo].[DIM_SALES_ORG].[SYS_SLS_ORG_GK] AS [so]))
| |--Hash Match(Inner Join, HASH:([c].[CONTR_GK])=([f].[CONTR_GK]), RESIDUAL:([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[CONTR_GK] as [f].[CONTR_GK]=[DMRPT].[dbo].[DIM_CONTRACTOR].[CONTR_GK] as [c].[CONTR_GK]))
| |--Compute Scalar(DEFINE:([Expr1014]=CONVERT_IMPLICIT(numeric(38,0),[DMRPT].[dbo].[DIM_CONTRACTOR].[CONTR_SRC_KEY] as [c].[CONTR_SRC_KEY],0)))
| | |--Index Scan(OBJECT:([DMRPT].[dbo].[DIM_CONTRACTOR].[nc_csk] AS [c]))
| |--Hash Match(Inner Join, HASH:([r].[REQ_POS_GK])=([f].[REQ_POS_GK]), RESIDUAL:([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[REQ_POS_GK] as [f].[REQ_POS_GK]=[DMRPT].[dbo].[DIM_REQUISITION_POS].[REQ_POS_GK] as [r].[REQ_POS_GK]))
| |--Compute Scalar(DEFINE:([Expr1013]=CONVERT_IMPLICIT(numeric(38,0),[DMRPT].[dbo].[DIM_REQUISITION_POS].[REQ_POS_JOB_REQ_SRC_KEY] as [r].[REQ_POS_JOB_REQ_SRC_KEY],0)+[DMRPT].[dbo].[DIM_REQUISITION_POS].[REQ_POS_POSITION_NO] as [r].[REQ_POS_POSITION_NO]))
| | |--Clustered Index Scan(OBJECT:([DMRPT].[dbo].[DIM_REQUISITION_POS].[SYS_C00600262] AS [r]))
| |--Hash Match(Inner Join, HASH:([cal].[DATE_GK])=([f].[WEEK_END_DATE_GK]), RESIDUAL:([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[WEEK_END_DATE_GK] as [f].[WEEK_END_DATE_GK]=[DMRPT].[dbo].[DIM_CALENDAR].[DATE_GK] as [cal].[DATE_GK]))
| |--Clustered Index Scan(OBJECT:([DMRPT].[dbo].[DIM_CALENDAR].[SYS_C00599872] AS [cal]), WHERE:([DMRPT].[dbo].[DIM_CALENDAR].[FULL_DATE] as [cal].[FULL_DATE]>=getdate()-'1900-01-31 00:00:00.000'))
| |--Clustered Index Scan(OBJECT:([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[PK_FCT_PRDCR_SPRD_HRS] AS [f]))
|--Compute Scalar(DEFINE:([Expr1016]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_OPR_UNT_SRC_KEY] as [so].[SLS_ORG_OPR_UNT_SRC_KEY], [Expr1017]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_PROD_SRC_KEY] as [so].[SLS_ORG_PROD_SRC_KEY], [Expr1018]=[DMRPT].[dbo].[DIM_CALENDAR].[WEEK_END_DATE] as [cal].[WEEK_END_DATE], [Expr1019]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_EMPL_SRC_KEY] as [so].[SLS_ORG_EMPL_SRC_KEY], [Expr1020]=[DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_JOBCODE] as [so].[SLS_ORG_JOBCODE]))
|--Hash Match(Aggregate, HASH:([so].[SLS_ORG_OPR_UNT_SRC_KEY], [so].[SLS_ORG_PROD_SRC_KEY], [cal].[WEEK_END_DATE], [so].[SLS_ORG_EMPL_SRC_KEY], [so].[SLS_ORG_JOBCODE]), RESIDUAL:([DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_OPR_UNT_SRC_KEY] as [so].[SLS_ORG_OPR_UNT_SRC_KEY] = [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_OPR_UNT_SRC_KEY] as [so].[SLS_ORG_OPR_UNT_SRC_KEY] AND [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_PROD_SRC_KEY] as [so].[SLS_ORG_PROD_SRC_KEY] = [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_PROD_SRC_KEY] as [so].[SLS_ORG_PROD_SRC_KEY] AND [DMRPT].[dbo].[DIM_CALENDAR].[WEEK_END_DATE] as [cal].[WEEK_END_DATE] = [DMRPT].[dbo].[DIM_CALENDAR].[WEEK_END_DATE] as [cal].[WEEK_END_DATE] AND [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_EMPL_SRC_KEY] as [so].[SLS_ORG_EMPL_SRC_KEY] = [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_EMPL_SRC_KEY] as [so].[SLS_ORG_EMPL_SRC_KEY] AND [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_JOBCODE] as [so].[SLS_ORG_JOBCODE] = [DMRPT].[dbo].[DIM_SALES_ORG].[SLS_ORG_JOBCODE] as [so].[SLS_ORG_JOBCODE]) DEFINE:([Expr1010]=SUM([DMRPT].[dbo].[FACT_PRODUCER_SPREAD_HOURS].[SPREAD_LCL] as [f].[SPREAD_LCL])))
|--Table Spool