From the course: SQL Server Performance for Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Why stored procedures are better than views for reports

Why stored procedures are better than views for reports - SQL Server Tutorial

From the course: SQL Server Performance for Developers

Start my 1-month free trial

Why stored procedures are better than views for reports

- [Narrator] You've learned about views and nested views, and their problems and how they can be very difficult to troubleshoot, particularly when performance goes awry. In this module, we're going to talk about why stored procedures are better than views. I'm going to speak, in the beginning of this, to a specific use case where I commonly see these two patterns or bad decisions made, and that's business intelligence or reporting projects. And these mistakes tend to happen not from developers, but from business analysts who are writing to sequel, and can maybe get a little bit scared of the complexity of a stored procedure even though it's effectively the same code base as a view. They'll go ahead and create views for reports, and then we end up with that same nested view problem. What I'd like you to take away from this is if you're involved with any of those projects, or you're near one, you want to be the person who recommends that you implement stored procedures as a standard…

Contents