Before the interview was asked why to use the MySQL stored procedures, or the advantages of stored procedures. As a professional MySQL DBA. Must be mastered, surely. And I'm just ops, hahaha. At that time the answer was not good, and then tidied up
About these, the stored procedure executes fast, the stored procedure can reduce network traffic, improve the flexibility of the application code, and improve the data security mechanism.
Kuanghan Ah! Look at others foreign devil tidy ah. Master Yi Long Technology to the system of Yi, Rise Ah!!!
? The use of stored programs can leads 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 has 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 stored procedures Getting started and improved (second article)