SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Getting rid of views within views
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 01/31/2014 :  09:47:22  Show Profile  Reply with Quote
Hi all,

I've got an upcoming project that will involve re-engineering a bunch of "nested" views, anyone have any handy articles or best practice checklists ?

Thanks,


JB

James K
Flowing Fount of Yak Knowledge

3744 Posts

Posted - 01/31/2014 :  14:45:45  Show Profile  Reply with Quote
I don't know of any articles or best practices related to that specific task. However, I would consider at least the following aspects:

1. When you get rid of the nested views (assuming you will be dropping them), make sure that no other process/procedure in the database (or on the server) or in any external code is using those views.

2. Getting rid of a nested view simply for the sake of getting rid of it may not add much value. Sometimes, I have seen performance improvement when you get rid of views and embed them as part of the query calling the views. Is that the motivation?

3. In some cases, it just might be simpler to keep those nested views. If the result of removing the views will cause the final result to be a set of cte's stacked on top of one another, it just may be more readable and easy to maintain the code had you left them as nested views.

Those are the only thoughts I have as of now - if I think of anything else, will add them later.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000