I forgot the simple syntax to get query running in session and ended up on my own old post. Here is the one method I use most during performance tuning.
SQL SERVER – View Over the View Not Possible with Index View – Limitations of the View 11
Why can’t you create a view over the view and index it? An index view cannot reference another view. Limitation of the view 11 shows an example.
Wait Statistics: Read the Snapshot Before Naming the Bottleneck
Wait statistics provide a starting point for investigation. Separate cumulative completed waits, background activity, signal time and currently waiting requests before treating the largest total as the present bottleneck.
SQL SERVER – Keywords View Definition Must Not Contain for Indexed View – Limitation of the View 10
A quick reference of the keywords a view definition must not contain if you want an indexed view in SQL Server, part 10 of my views series.
SQL SERVER – SELF JOIN Not Allowed in Indexed View – Limitation of the View 9
Self Join is handy, but it is not allowed in indexed view definitions. Limitation of the view 9 reuses my employee and manager example to show it.
SQL SERVER – Get Numeric Value From Alpha Numeric String – Get Numbers Only
Reader Christofer improved my logic to get a numeric value from alpha numeric string data. His stored procedure uses REVERSE and PATINDEX.
SQL SERVER – Outer Join Not Allowed in Indexed Views – Limitation of the View 8
Why is an outer join not allowed in indexed views? Rows can logically disappear when you insert into a base table. Limitation of the view 8 shows an example.







