开发者

SQL views. do i need to use it to increase performance?

开发者 https://www.devze.com 2023-01-06 04:40 出处:网络
i mostly need to know - views a开发者_运维问答nd their purpose ? - do they increase performance of an application ?

i mostly need to know - views a开发者_运维问答nd their purpose ? - do they increase performance of an application ? - in what kind of cicumstance will I need to use views?


As this is homework you should probably be doing research.

A quick Google yields plenty of links, one of which is http://www.techotopia.com/index.php/An_Introduction_to_MySQL_Views.

MySQL views are essentially a way to package up SELECT statements into re-usable virtual tables whereby the data can be retrieved simply by referencing the view, rather than having to repeat the associated SELECT statement.

The official site documentation is quite informative and readable too.

See: the MySQL FAQ page on Views and the Using Views documentation.


Views provide an abstraction layer over your tables.

They can be used to prevent access to certain sensitive columns (such as salary).

They are often used to encapsulate logic for reporting.


in what kind of cicumstance will I need to use views?

If you're repeatedly using the same SELECT statement that uses lots of JOINs and/or function calls, a view makes it simpler to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消