An indexed view needs WITH SCHEMABINDING, and that rules out cross database queries. Limitation of the view 7 walks through it with two test databases.
SQL SERVER – UNION Not Allowed but OR Allowed in Index View – Limitation of the View 6
UNION not allowed in an indexed view can surprise you. Limitation of the view 6 shows the script that fails and how the OR operator is allowed instead.
SQL SERVER – COUNT(*) Not Allowed but COUNT_BIG(*) Allowed – Limitation of the View 5
A view with COUNT(*) cannot get a clustered index, but switch to COUNT_BIG and it works. Limitation of the view 5, shown with a simple tempdb example.
SQL SERVER – How to Stop Growing Log File Too Big
A client kept truncating the transaction log because of a growing log file. I explain why that is risky and share two better options, starting with Simple recovery.
Percent of Total With SUM() OVER() in One Query
Calculate percent of total with SUM() OVER(), group and running shares, safe numeric division, and checks for zero totals.
SQL SERVER – Disabled Index and Index Levels and B-Tree
For T-SQL Tuesday I write about my mentor Vinod Kumar and his interesting question, which leads to a disabled index, its index levels and the B-Tree.




