有许多信息不适合作为度量而且没有必要的维度,因此我决定将这些数据集成到FactTable中,以便稍后进行钻取操作(文档编号,文档行等信息) 。所以我使用FactTable作为事实维度(或者Kimball称之为退化维度)。使用Measure Group创建事实维度后,如下图所示:
FactTable / Fact维度有140.000.000行,因此我决定使用ROLAP作为存储模式,试图避免MOLAP处理,但现在性能问题会在钻取操作中移动。所有其他尺寸均在MOLAP中。
分析在64x服务器上进行,内存为98GB,Memory\TotalMemoryLimit
设置为70%。
当执行钻取操作(在rolap中的退化维度上)时,我也激活了Profiler,因此我得到了SQL-Query。大量的聚合和分组 - 没有想知道。
在这种情况下,如何处理性能,以便钻取操作和退化维度的处理将以及时的方式执行?
更新13.04
SELECT
SUM ( [dbo_FactCdbSAP_Details].[Amount] ) AS Amount,
SUM ( [dbo_FactCdbSAP_Details].[SharedAmount] ) AS SharedAmount,
[dbo_FactCdbSAP_Details].[Pk_id] ,
[dbo_FactCdbSAP_Details].[DocumentNo] ,
[dbo_FactCdbSAP_Details].[DocumentLine] ,
[dbo_FactCdbSAP_Details].[DocumentHeader] ,
[dbo_FactCdbSAP_Details].[DocumentType] ,
[dbo_FactCdbSAP_Details].[Reference] ,
[dbo_FactCdbSAP_Details].[DocumentDate] ,
[dbo_FactCdbSAP_Details].[EntryDate] ,
[dbo_FactCdbSAP_Details].[FiscalPeriod] ,
[dbo_FactCdbSAP_Details].[StornoDocNo] ,
[dbo_FactCdbSAP_Details].[DocumentCurrency] ,
[dbo_FactCdbSAP_Details].[CustomerNumber] ,
[dbo_FactCdbSAP_Details].[EnteredBy] ,
[dbo_FactCdbSAP_Details].[PartnerSegment] ,
[dbo_FactCdbSAP_Details].[PartnerBusinessArea] ,
[dbo_FactCdbSAP_Details].[ItemText] ,
[dbo_FactCdbSAP_Details].[ID_Date] ,
[dbo_FactCdbSAP_Details].[ID_CostCategory] ,
[dbo_FactCdbSAP_Details].[ID_CostCenter] ,
[dbo_FactCdbSAP_Details].[ID_Currency] ,
[dbo_FactCdbSAP_Details].[ID_Branch] ,
[dbo_FactCdbSAP_Details].[ID_Customer] ,
[dbo_FactCdbSAP_Details].[ID_Scenario] ,
[dbo_DimCostCategory_3].[AccountNo] ,
[dbo_DimCostCategory_3].[AccountNameDEU] ,
[dbo_DimCostCategory_3].[AccountNameEng] ,
[dbo_DimCostCategory_3].[AccountType] ,
[dbo_DimCostCategory_3].[AccountSetSAP] ,
[dbo_DimCostCenter_4].[CostCenterNo] ,
[dbo_DimCostCenter_4].[CostCenterName] ,
[dbo_DimCostCenter_4].[CostCenterAliasDEU] ,
[dbo_DimCostCenter_4].[CostCenterAliasENG] ,
[dbo_DimCurrency_5].[CurrencyCode] ,
[dbo_DimCurrency_5].[CurrencyENG] ,
[dbo_DimBranchShare_6].[Branch No] ,
[dbo_DimBranchShare_6].[Branch Name DE] ,
[dbo_DimBranchShare_6].[Branch Name TM1] ,
[dbo_DimBranchShare_6].[Branch Name ENG] ,
[dbo_DimBranchShare_6].[BranchId] ,
[dbo_DimBranchShare_6].[SharePercentage] ,
[dbo_DimBranchShare_6].[Branch Name ASL] ,
[dbo_DimBranchShare_6].[Country] ,
[dbo_DimBranchShare_6].[Currency] ,
[dbo_DimBranchShare_6].[IsSAP] ,
[dbo_DimCustomers_7].[Customer No] ,
[dbo_DimCustomers_7].[Customer Name1] ,
[dbo_DimCustomers_7].[Short Name] ,
[dbo_DimCustomers_7].[Street] ,
[dbo_DimCustomers_7].[Country] ,
[dbo_DimCustomers_7].[Postal Code] ,
[dbo_DimCustomers_7].[Telefon No] ,
[dbo_DimCustomers_7].[Fax TeletexNo] ,
[dbo_DimCustomers_7].[Attending BST] ,
[dbo_DimCustomers_7].[Key Industry Sector] ,
[dbo_DimCustomers_7].[Booking No] ,
[dbo_DimCustomers_7].[Status Inactiv] ,
[dbo_DimCustomers_7].[Company Key] ,
[dbo_DimCustomers_7].[Direct Mailing Forwarder] ,
[dbo_DimCustomers_7].[Direct Mailing BKeeping] ,
[dbo_DimCustomers_7].[Direct Mailing Sales] ,
[dbo_DimCustomers_7].[Direct Mailing Magazines] ,
[dbo_DimCustomers_7].[Customer Name2] ,
[dbo_DimCustomers_7].[Customer Name3] ,
[dbo_DimScenario_8].[ScenarioTypeENG] ,
[dbo_DimDate_2].[Quarter] ,
[dbo_DimDate_2].[Jan-Feb] ,
[dbo_DimDate_2].[Jan-Mrz] ,
[dbo_DimDate_2].[Jan-Apr] ,
[dbo_DimDate_2].[Jan-Mai] ,
[dbo_DimDate_2].[Jan-Jun] ,
[dbo_DimDate_2].[Jan-Jul] ,
[dbo_DimDate_2].[Jan-Aug] ,
[dbo_DimDate_2].[Jan-Sep] ,
[dbo_DimDate_2].[Jan-Okt] ,
[dbo_DimDate_2].[Jan-Nov] ,
[dbo_DimDate_2].[Jan-Dez] ,
[dbo_DimDate_2].[MonthName] ,
[dbo_DimDate_2].[Semester]
FROM (
SELECT
[dbo].[FactCdbSAP_Details].[Pk_id],
[dbo].[FactCdbSAP_Details].[ID_Date],
[dbo].[FactCdbSAP_Details].[ID_Scenario],
[dbo].[FactCdbSAP_Details].[ID_Branch],
[dbo].[FactCdbSAP_Details].[ID_CostCategory],
[dbo].[FactCdbSAP_Details].[ID_CostCenter],
[dbo].[FactCdbSAP_Details].[ID_Customer],
[dbo].[FactCdbSAP_Details].[ID_Currency],
[dbo].[FactCdbSAP_Details].[DocumentNo],
[dbo].[FactCdbSAP_Details].[DocumentLine],
[dbo].[FactCdbSAP_Details].[DocumentHeader],
[dbo].[FactCdbSAP_Details].[DocumentType],
[dbo].[FactCdbSAP_Details].[Reference],
[dbo].[FactCdbSAP_Details].[DocumentDate],
[dbo].[FactCdbSAP_Details].[EntryDate],
[dbo].[FactCdbSAP_Details].[FiscalPeriod],
[dbo].[FactCdbSAP_Details].[StornoDocNo],
[dbo].[FactCdbSAP_Details].[DocumentCurrency],
[dbo].[FactCdbSAP_Details].[CustomerNumber],
[dbo].[FactCdbSAP_Details].[EnteredBy],
[dbo].[FactCdbSAP_Details].[PartnerSegment],
[dbo].[FactCdbSAP_Details].[PartnerBusinessArea],
[dbo].[FactCdbSAP_Details].[ItemText],
[dbo].[FactCdbSAP_Details].[Amount],
[dbo].[FactCdbSAP_Details].[SharedAmount]
FROM [dbo].[FactCdbSAP_Details]
WHERE
id_date >201509
) AS [dbo_FactCdbSAP_Details],
[dbo].[DimCostCategory] AS [dbo_DimCostCategory_3],
[dbo].[DimCostCenter] AS [dbo_DimCostCenter_4],
[dbo].[DimCurrency] AS [dbo_DimCurrency_5],
[dbo].[DimBranchShare] AS [dbo_DimBranchShare_6],
[dbo].[DimCustomers] AS [dbo_DimCustomers_7],
[dbo].[DimScenario] AS [dbo_DimScenario_8],
[dbo].[DimDate] AS [dbo_DimDate_2]
WHERE
[dbo_FactCdbSAP_Details].[ID_Date] = [dbo_DimDate_2].[ID_Date]
AND
[dbo_FactCdbSAP_Details].[ID_CostCategory] = [dbo_DimCostCategory_3].[PK_Cost]
AND
[dbo_FactCdbSAP_Details].[ID_CostCenter] = [dbo_DimCostCenter_4].[Pk_CostCenter]
AND
[dbo_FactCdbSAP_Details].[ID_Currency] = [dbo_DimCurrency_5].[Pk_Currency]
AND
[dbo_FactCdbSAP_Details].[ID_Branch] = [dbo_DimBranchShare_6].[PK_ShareBranch]
AND
[dbo_FactCdbSAP_Details].[ID_Customer] = [dbo_DimCustomers_7].[Pk_Customer]
AND
[dbo_FactCdbSAP_Details].[ID_Scenario] = [dbo_DimScenario_8].[Pk_Scenario]
AND
[dbo_DimCurrency_5].[CurrencyDEU] = 'Lokale Währung'
AND
[dbo_DimScenario_8].[ScenarioTypeDEU] = 'Ist'
AND
[dbo_DimDate_2].[Year] = 2016
AND
[dbo_DimDate_2].[Month] = 2
group by
....
答案 0 :(得分:1)
为了在钻取操作和处理方面获得良好的性能,我们找到并实施了以下解决方案:
AttributeHierarchyOptimizedState=FullyOptimized
了解退化维度的所有属性AttributeHierarchyOrdered=false
代表退化维度的主键使用DataFlowTask创建了SSIS包。在DataFlowTask内部,delta表被设置为OLEDB Source和Dimension Processing Task as Destination(这意味着Incremental在MOLAP Dimension中直接添加)。下图显示:
非常感谢 Greg Galloway 在此帖子中描述ProcessAdd ond large dimension http://www.artisconsulting.com/blogs/greggalloway/2007/4/20/processadd-on-large-dimensions