SQL Server 上索引视图(=物化视图)的按需刷新模式?

发布于 2024-09-01 06:02:17 字数 163 浏览 3 评论 0原文

我知道 Oracle 为其物化视图提供了多种刷新模式选项(按需、提交、定期)。 Microsoft SQLServer 是否为其索引视图提供相同的功能?

如果没有,如果我的目的是每天导出数据+,我怎样才能在 SQLServer 上使用索引视图 按需基础上,并想避免性能开销问题?是否存在解决方法?

I know Oracle offers several refreshmode options for their materialized views (on demand, on commit, periodically).
Does Microsoft SQLServer offer the same functions for their indexed views?

If not, how can I else use indexed views on SQLServer if my purpose is to export data on a daily+
on-demand basis, and want to avoid performance overhead problems? Does a workaround exist?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

私藏温柔 2024-09-08 06:02:17

SQL Server 中的物化视图始终是最新的,而 INSERT/UPDATE/DELETE 的开销会影响视图。

我不完全确定您的要求是什么,您的问题对我来说并不完全清楚。但是,如果您只需要一次开销,每天+按需,我建议您在不需要时删除索引,并在需要时重新创建它。索引将在您创建时构建,然后它将是最新的。删除索引后,INSERT/UPDATE/DELETE 命令不会产生任何开销。

A materialized view in SQL Server is always up to date, with the overhead on the INSERT/UPDATE/DELETE that affects the view.

I'm not completely sure of what your require, you question isn't completely clear to me. However, if you only want the overhead one time, on a daily+ on-demand basis , I suggest that you drop the index when you don't need it and recreate it when you do. The index will be built when you create it, and it will be then up to date. When the index is dropped there will not be any overhead on your INSERT/UPDATE/DELETE commands.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文