Tag : Index

Thanks to Ola Hallengren, here is a simple scrip to report the fragmentation level of you database’s index One thing to note, if you don’t see any results after running this, you may have no index larger then 1000 pages, or no fragmentation at all ! Lucky you ! DECLARE @DatabaseID int SET @DatabaseID = ..

Read more

Small simple scrip to automate SQL Index maintenance. Of course, the best scripts to accomplish this is Ola Hallengren’s SQL Server Maintenance Solution, that you can find here But if you want quick and simple, here it is; DECLARE @IndexName varchar(255) DECLARE @TableName varchar(255) DECLARE @Frag float DECLARE @FragCount as int DECLARE @DbName as varchar(255) ..

Read more