Link Details

Link 53009 thumbnail
User 111696 avatar

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.
  • 16
  • 3
  • 1753
  • 614

Comments

Add your comment
User 186344 avatar

kunnar replied ago:

0 votes Vote down Vote up Reply

I have to use stored procedures because of legacy reasons. But willingly i would never use them.

User 219720 avatar

glcomjbrown replied ago:

-3 votes Vote down Vote up Reply

Copy paste from site - lame. voted down.

User 244651 avatar

jakyra replied ago:

0 votes Vote down Vote up Reply

Site is down

User 205958 avatar

planetmcd replied ago:

0 votes Vote down Vote up Reply

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.

User 258396 avatar

scott.sobotka replied ago:

0 votes Vote down Vote up Reply

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.
,

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.