By bloid
via ifacethoughts.net
Published: Nov 15 2007 / 00:43
One of the most ignored features of the modern RDBMSs today is the stored procedures. In fact most of the web applications go to extreme lengths to increase performance but avoid the stored procedures. They are also one of the favorites in theory, but hated in practice. Are they so unnecessary? Are they so useless? Many say so.
Comments
kunnar replied ago:
I have to use stored procedures because of legacy reasons. But willingly i would never use them.
glcomjbrown replied ago:
Copy paste from site - lame. voted down.
jakyra replied ago:
Site is down
planetmcd replied ago:
I am a big proponent of keeping all the business logic in one place and that is generally best in the application code. It is not wise to be dogmatic about that stance though. As a result I generally avoid stored procedures, but I've worked on applications (Oracle and Postgres backed) where they've increased performance of generating data results tremendously. In particular, reporting on live data that required many multiple joins on large data sets where there are nested queries.
scott.sobotka replied ago:
I make a point of *only* using stored procedures to access the database. In fact, my application accounts can't even run a select on a table through straight SQL.
Also, the DBAs who maintain these applications can rewrite any query that has suffered a performance degradation over a time. Without that access to my SQL, all they can do is add indexes and hope that performance improves.
I can also test the exact same code from outside of my application with a simple CALL/EXEC statement.
I reduce my round trips, eliminate exposure to SQL injection, have tightly constrained tables and logins, greater testability, greater maintainability, and the list goes on.
In my experience, stored procedures have never done anything but improve the overall quality of my applications.
,
Voters For This Link (16)
Voters Against This Link (3)