如何在sqlite中创建物化视图? [英] How can a materialized view be created in sqlite?

查看:50
本文介绍了如何在sqlite中创建物化视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对物化视图和 SQLite 进行了无数次搜索.在我能找到的内容中,似乎在 2004 年和 2006 年提到 SQLite 没有物化视图.紧随其后的是 2008 年 3 月的 SQLite 变更日志,其中特别提到了优化物化视图.

I've done countless searches on materialized views and SQLite. Of what I can find there seems to be mentions in 2004 and 2006 that SQLite DOES NOT have materialized views. Followed immediately by SQLite's changelog from March 2008 where it specifically mentions optimizing materialized views.

现在,我认为要么是 2004 年和 2006 年已经过时,要么是 2008 年的变更日志是错误的.

Now, I figure logically either the 2004 and 2006 are outdated, or the 2008 changelog is wrong.

知道它是什么吗?

如果物化视图现在在 SQLite 中,它们是如何创建的?

If materialized views ARE now in SQLite, how are they created?

推荐答案

我想说的是不支持其他 DBMS 所谓的物化视图",而 ChangeLog 的意思是 MySQL 的 EXPLAIN 会调用文件排序";从 tempfiles 页面:

I'd say what other DBMSes call "materialized views" are not supported, and what that ChangeLog meant is what MySQL's EXPLAIN would call a "filesort"; from the tempfiles page:

2.5 视图和子查询的具体化

2.5 Materializations Of Views And Subqueries

包含子查询的查询必须有时评估子查询将结果单独存储在一个临时表,然后使用内容临时表的评估外查询.我们称之为具体化"子查询.[...]

Queries that contain subqueries must sometime evaluate the subqueries separately and store the results in a temporary table, then use the content of the temporary table to evaluate the outer query. We call this "materializing" the subquery. [...]

这篇关于如何在sqlite中创建物化视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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