- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
3#
发表于 2013-4-2 20:17:46
ODM FINDING:
TRUSTED Integrity Level
• Most practical setting for data warehouses
• MVs must contain fresh data
• Primary key, unique key, and foreign key
constraints should be ENABLED NOVALIDATE RELY
or ENABLE VALIDATE
• NOT NULL constraints can be in any state
• Uses relationships declared in dimensions
• Uses PREBUILT and view-based MVs
• Inaccurate results possible
query_rewrite_integrity = trusted
This setting is practical for most Data Warehouses because it is common practice for
constraints in such databases to be in ENABLED NOVALIDATE state. For such
constraints to be used for query rewrite, they must also be in RELY mode. Of course,
constraints will also be used if they are ENABLE VALIDATE (in this case
RELY/NORELY makes no difference).
MVs will be used for rewriting query blocks in more cases than the stricter
ENFORCED integrity level.
Inaccurate results may occur when:
• Relationships declared in dimensions are invalid (for example, when values at a
certain level of a dimension’s hierarchy do not roll up to exactly one parent
value). To avoid this problem, all dimensions should be validated using the
DBMS_OLAP.VALIDATE_DIMENSION procedure
• MVs are based on PREBUILT tables containing some data that violates
ENABLED NOVALIDATE constraints
• Relationships based on NOVALIDATE table or view constraints are bad because
some of the rows in the detail tables violate the constraints |
|