MySQL 是否有相当于 SQL Server“索引视图”的功能?

发布于 2024-08-26 17:05:26 字数 225 浏览 5 评论 0原文

MySQL 是否具有与 SQL Server 相同的“索引视图”功能?

视图比简单查询更快吗?

我特别寻找的是一种让 MySQL 创建“视图”的方法,该方法将比简单地执行下划线视图的查询/sql 更快地返回结果。

Does MySQL have an equalavent to SQL Servers "indexed view" functionality?

Is a view faster than a simple query?

What I'm specifically looking for is a way for MySQL to create a "view" that will return results faster than simply performing the underline view's query/sql.

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

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

发布评论

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

评论(1

莫言歌 2024-09-02 17:05:26

索引视图是 SQL Server 术语,表示物化视图,MySQL 不支持。

您可以:

  • 以给定的时间间隔重新创建一个临时表,填充所需的列
  • 使用实际的表,再次填充并建立索引 - 必须有一个过程来保持数据和索引最新

An Indexed View is SQL Server terminology for a materialized view, which MySQL does not support.

You can either:

  • re-create a temporary table, populated with the desired columns, at a given interval
  • use an actual table, populated and indexed though again - there'd have to be a process to keep the data and indexes current
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文