ITPub博客

首页 > IT基础架构 > 网络安全 > Materialized Views in data warehouse environment (185)

Materialized Views in data warehouse environment (185)

原创 网络安全 作者:tsinglee 时间:2007-11-12 10:57:11 0 删除 编辑

In data warehouses, materialized views are used to compute and store aggregated
data such as sums and averages. Materialized views in these environments are
typically referred to as summaries because they store summarized data. They can
also be used to compute joins with or without aggregations. If compatibility is set
to Oracle9i or higher, then materialized views can be used for queries that include
filter selections.
The optimizer can use materialized views to improve query performance by
automatically recognizing when a materialized view can and should be used to
satisfy a request. The optimizer transparently rewrites the request to use the
materialized view. Queries are then directed to the materialized view and not to
the underlying detail tables or views.

数据仓库环境下的物化视图
在数据仓库中,物化视图常被用于计算和存储聚合数据,例如汇总,平均等.在数据仓库环境中,物化视图也被称为概要,
因为其中通常存储的是汇总数据.用户也可以使用物化视图存储多个表连接后的结果集.如果数据库的兼容性参数被设为 Oracle9i 或更高,
物化视图的查询中可以包含过滤选择

优化器可以利用物化视图来提升查询性能.优化器能够自动地判断一个存储汇总数据的物化视图是否能满足用户的查询要求,
以及使用此物化视图是否能提高查询性能.之后优化器能够重写用户提交的查询以便使用相应的物化视图,而这个重写过程对用户是透明的.
此时查询直接使用物化视图,而非用户提交的 SQL 语句中指定的明细数据表或视图.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-981812/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1900631