《Microsoft SQL Server 2008 Analysis Services Step by Step》学习笔记十五:设计聚合(Aggregation)(下)

SQL Server 2008中SQL应用系列及BI笔记系列--目录索引

导读:本文继续介绍Analysis Services中设计聚合(Aggregations)

本文将包括以下内容:

■1、使用Aggregation设计向导设计Aggregation

■2、通过创建属性关联和用户自定义层次来改善Aggregation

■3、使用AggregationUsage特性控制一个属性的聚合

■4、设计一个独立的Aggregation

■5、通过长期的数据量的估算改善Aggregation(Improve aggregation design by using long-term estimates of data volume)

■6、启用Analysis Services查询日志

■7、基于使用Usage-Based的优化向导的日志查询设计Aggregation

 

本文末尾提供两个项目源码:AdventureWorks_BI_Begin13和AdventureWorks_BI_End13,顾名思义,开始和完成。另外,包括数据库文件SSAS2008SBS_Data,请读者自行修改数据源ds的连接串。

 

4、不使用聚合向导设计聚合

下面我们不使用聚合设计向导设计聚合。

邀月工作室

邀月工作室

改变Partition Counts

邀月工作室

邀月工作室

邀月工作室

邀月工作室

部署项目。

5-7、使用Usage-Based优化向导

除了使用聚合向导,还可以使用基于Usage-Based优化向导来设计聚合(http://64.4.11.252/zh-cn/library/ms189706(SQL.90).aspx ),区别在于:

Usage-Based的优化向导用于为分区设计聚合,设计聚合时所基于的是 Analysis Services 实例查询日志中所记录的特定使用模式的查询。

聚合向导则考虑所有可能的查询。

我们启用查询日志

邀月工作室

邀月工作室

重新切换到vs项目,

邀月工作室

邀月工作室

OLAPQueryLOG数据表的字段如下:

MSOLAP_Database: Name of the Analysis Services database
MSOLAP_ObjectPath Fully qualifed name of the object that was queried in the format ServerName DatabaseName CubeName PartitionName

MSOLAP_User : Name of the user who executed the query
Dataset: A string of zeros and ones indicating the level of each attribute hierarchy used to provide the query results Don’t worry about trying
to interpret this string; the Usage-Based Optimization Wizard will interpret the string and display the names of the attribute hierarchies returned by a query
StartTime Time the query began in Coordinated Universal Time (UTC)
Duration Length of time, in milliseconds, that it took to execute the query

下面我们使用日志进行Usage-Based的优化聚合设计

邀月工作室

邀月工作室

邀月工作室

邀月工作室


邀月工作室

邀月工作室

邀月工作室

邀月工作室

源码下载:

begin13

end13

数据库下载

参考资源:

1、SQL Server Analysis Services 官方教程

http://technet.microsoft.com/zh-cn/library/ms170208.aspx

邀月注:本文版权由邀月和CSDN共同所有,转载请注明出处。
助人等于自助! 
3w@live.cn  

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值