Index fragmentation in MSSQL Server

MSSQL server index fragmentation check code snippet I had in my archive. It shows what indices would be good to add, and also shows the most CPU intense queries. A nice SQL optimization toolkit.

Following previous SQL optimization and tips&tricks post, posting a few more SQL optimization code snippets.