如何以受支持的方式使用覆盖索引视图? [英] How can I use a covering indexed view in a supported manner?

查看:51
本文介绍了如何以受支持的方式使用覆盖索引视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据不受支持的自定义


由于引用完整性或升级问题,也不支持向数据库添加表,存储过程或视图。

Adding tables, stored procedures, or views to the database is also not supported because of referential integrity or upgrade issues.

我有一个过程可以返回工作人员最近拨打的电话。这引起了一个问题,因为我们是一个呼叫中心,已经有数百万个电话,并且每天增加几千个。

I have a process that returns the most recently due phone call for staff to dial. This is causing a problem because we are a call centre, with a couple million calls already and adding a few thousand a day.

我想添加索引视图,它提供了覆盖索引,用于基本表中所需的几个字段。这将按到期日和我们使用的其他条件编制索引。我估计每次请求下一次调用时,这可能会将〜1000000逻辑读取减少到少于100。

I'd like to add an indexed view which provides a covering index for the few fields required from the base tables. This will be indexed by due date and other criteria we use. I've estimated this could reduce ~1000000 logical reads every time the next call is requested to less than 100.

我知道支持添加普通索引,但是添加视图不是。上面给出的原因是RI和升级。 RI是否会成为问题?我不会更改数据的任何约束条件,只是跟踪其中的内容。 升级会成为问题吗?这只是一个索引,在任何升级期间我都可以删除它。

I know that adding a plain index is supported, but adding a view is not. The reason given above are RI and upgrades. Will RI be an issue? I'm not changing any constraint on the data, just keeping track of what is there. Will upgrades be an issue? It's only an index, I could drop it for the duration of any upgrades.

推荐答案

我们过去添加了自定义视图。升级(以及汇总)对于添加任何对象(例如存储的proc,视图等)将是一个问题。为了避免出现问题,我们在修补过程中将其删除。显然不支持此功能,但是众所周知,Microsoft支持甚至支持不受支持的更改。

We have added custom views in the past. Upgrades (as well as rollups) will be a problem for adding any objects like stored procs, views, etc. We have dropped them during the patching to avoid issues. THis is obviously unsupported, but Microsoft support is known to support even unsupported changes.

这篇关于如何以受支持的方式使用覆盖索引视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆