This is another check you should perform once databases start to get large, as having fragmented indexes have a huge performance hit.
For more on what fragmented indexes are, read this fantastic article.
After significant trial and error we have come up with an SQL script that lists all indexes for every table and shows the percentage fragmentation for the selected database on your server in one go!
db_name(a.database_id) As DatabaseName,
sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS a
INNER JOIN sys.indexes AS b ON a.OBJECT_ID = b.OBJECT_ID AND a.index_id = b.index_id
a.database_id = DB_ID()