Views & Joins – How many is too many??? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Views & Joins – How many is too many???

Accidental duplicate post. Please ignore.
My thought would be simply that treat views as joins if that is what they are. Let’s say view A joins two tables and view B joins three. If you then create a view that joins A and B you really have four joins. A1 to A2, B1 to B2, B1 to B3, and A to B. When I run into a situation like what you are seeing, I often try to simplify where the data is coming from. Sometimes you can eliminate entire views by finding the same data elsewhere or by writing new views that take the place of two or more. As for function calls, that really depends on the function. Stating the obvious, some can be very complex and others not. I guess I would start by deconstructing the view giving you problems. You could create a tree structure mapping out the view heirarchy and start performance tracing from the base statements up. You may find one or two sub views in particular are responsible for the timeout and not the whole thing combined. John
For those wondering about what spacemonkey post is about, the duplicated post is
Well. Continue with that topic Madhivanan Failing to plan is Planning to fail