mysql存储过程入门与提高(第二篇)

以前面试的时候被问道为啥用mysql存储过程,或者存储过程的优点。作为一个专业的mysql dba。肯定是必须要掌握的。而我只是运维啊 哈哈哈。当时回答的不好,后来整理了

大概这几条,存储过程执行速度快,存储过程能够减少网络流量,提高应用程序代码的灵活性,提高数据安全保护机制。

狂汗啊!看人家洋鬼子整理的多齐整啊。师夷长技以制夷,奋起啊!!!

• The use of stored programs can lead to a more secure database.
• Stored programs offer a mechanism to abstract data access routines, which can
improve the maintainability of your code as underlying data structures evolve.

• Stored programs can reduce network traffic, because the program can work on
the data from within the server, rather than having to transfer the data across the
network.
• Stored programs can be used to implement common routines accessible from
multiple applications—possibly using otherwise incompatible frameworks—
executed either within or from outside the database server.
• Database-centric logic can be isolated in stored programs and implemented by
programmers with more specialized, database experience.
• The use of stored programs can, under some circumstances, improve the porta-
bility of your application.


你可能感兴趣的:(mysql存储过程入门与提高(第二篇))