继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

mysql视图

守候你守候我
关注TA
已关注
手记 206
粉丝 14
获赞 36

Summary: in this tutorial, you are going to learn about MySQL View. We will explain how MySQL implements views.

MySQL supports database views or views since version 5.X. In MySQL, almost features of views conform to the SQL: 2003 standard. MySQL process queries to the views in two ways:

  • MySQL creates a temporary table based on the view definition statement and then executes the incoming query on this temporary table.

  • First, MySQL combines the incoming query with the query defined the view into one query. Then, MySQL executes the combined query.

MySQL supports version system for views. Each time when the view is altered or replaced, a copy of the existing view is back up in arc (archive) folder which resides in a specific database folder. The name of back up file is view_name.frm-00001. If you then change the view again, MySQL will create a new backup file named view_name.frm-00002.

MySQL also allows you to create a view of views. In the SELECT statement of view definition, you can refer to another views.

If the cache is enabled, the query against a view is stored in the cache. As the result, it increases the performance of the query by pulling data from the cache instead of querying data from the underlying tables.

Related Tutorials

原文链接:http://outofmemory.cn/mysql/view/mysql-views

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP