Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Getting rid of views within views

Author  Topic 

JaybeeSQL
Posting Yak Master

112 Posts

Posted - 2014-01-31 : 09:47:22
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
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-01-31 : 14:45:45
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
   

- Advertisement -