Bookmark and Share
Disadvantages of mysql stored procedures
(Publish Date: 2009-11-4 4:17pm, Total Visits: 3899, Today: 1, This Week: 1, This Month: 7)

• MySQL doesn’t provide good developing and debugging tools, so it’s harder to
write stored code in MySQL than it is in some other database servers.
• The language is slow and primitive compared to application languages. The
number of functions you can use is limited, and it’s hard to do complex string
manipulations and write intricate logic.
• Stored code can actually add complexity to deploying your application. Instead
of just application code and database schema changes, you’ll need to deploy
code that’s stored inside the server, too.
• Because stored routines are stored with the database, they can create a security
vulnerability. Having nonstandard cryptographic functions inside a stored routine,
for example, will not protect your data if the database is compromised. If
the cryptographic function were in the code, the attacker would have to compromise
both the code and the database.
• Storing routines moves the load to the database server, which is typically harder
to scale and more expensive than application or web servers.
• MySQL doesn’t give you much control over the resources stored code can allocate,
so a mistake can bring down the server.
• MySQL’s implementation of stored code is pretty limited—execution plan
caches are per-connection, cursors are materialized as temporary tables, and so
on. (We mention the limitations of various features as we describe them.)
• It’s hard to profile code with stored procedures in MySQL. It’s difficult to analyze
the slow query log when it just shows CALL XYZ('A'), because you have to go
and find that procedure and look at the statements inside it.
• Stored code is a way to hide complexity, which simplifies development but is
often very bad for performance.

(extracted from )