Views and Stored Procedures

Came across an interesting piece of information about views and using them in Stored Procedures. According to Greg Low and a post on the subject view inside stored procedures can lead to performance issues. Now the example that Greg gives is quite extreme never the less it sounds like it is something he found in the wild.

If you were an experienced developer and it was done as an exception you aren’t going to cause yourself any grief. The problem with this sort of practice is that is it is the norm that you can quickly get in a situation where multiple view are accessing each other and the resulting query is messy but also inefficient.

So bottom line, best practice is not to use views in Stored Procedures.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: