Minion.IndexMaintLog


Holds a database level summary of the maintenance operation. This table stores the parameters and settings that were used during the operation, as well as status and summary information. This information can help with troubleshooting, or just stats gathering when you want to see what has happened between one maintenance run to the next. For example, you can use this to determine why a job has wildly varying run times.

Name
Type
Description
ID
Bigint
Primary key row identifier.
ExecutionDateTime
datetime
Date and time of the entire run. If several databases are run in the same job then this value will be the same for all of them.
Join ExecutionDatetime and DBName with the same columns in the Minion.IndexMaintDetails table to see full details.
Status
Varchar
Status of the current reindex operation. If the database completes without error this column will be set to ‘Complete’. If the database encountered errors you will see ‘Complete with errors’.
This column will also be updated with high level status messages when using the Live Insight feature. To see details of these high level messages check the Status column in the IndexMaintLogDetails table. If the current database is complete and this column doesn’t have ‘Complete’ or ‘Complete with errors’, then that probably means that the job was stopped either by an unhandled fatal error or manually. Once the job is stopped there is no way to update this column further so it will be stuck in an invalid status.
DBName
varchar
Database name.
Tables
Varchar
Shows whether Offline, Online, or All indexes were processed. Offline indexes are those that have to be done offline because they contain a legacy data type like text, image, etc. Online tables are the ones that can be processed online. If you choose Online for a table and it has an index that must be done offline, then that index will be excluded from processing.
RunPrepped
bit
This shows that the job was called with this option set to 1. RunPrepped means that a PrepOnly run was executed before in order to store the fragmentation stats for the indexes.
For more information, see “How To: Gather index fragmentation statistics on a different schedule from the reindex routine”.
PrepOnly
bit
This option is used to prepare a reindexing job for later processing.
For more information, see “How To: Gather index fragmentation statistics on a different schedule from the reindex routine”.
ReorgMode
varchar
Shows that the job was called with either REORG, REBUILD, or All. If set to REORG, tables will only be reorged. This includes tables that are past the RebuildThreshold. However, if REBUILD is used, only tables that are past the RebuildThreshold will be processed. Tables between the ReorgThreshold and RebuildThreshold will be ignored.
NumTablesProcessed
int
The number of tables processed for the current database.
NumIndexesProcessed
int
The number of indexes processed for the current database.
NumIndexesRebuilt
int
The number of indexes rebuilt for the current database.
NumIndexesReorged
int
The number of indexes reorged for the current database.
RecoveryModelChanged
bit
0 or 1. Was the recovery model for the current database changed?
RecoveryModelCurrent
varchar
This is the recovery model of the database before the reindex operation began.
RecoveryModelReindex
varchar
This is the recovery model of the database during the operation. The recovery model can be changed in the IndexSettingsDB table.
SQLVersion
varchar
The current version of SQL Server.
SQLEdition
varchar
The current edition of SQL Server.
DBPreCode
nvarchar
Any database-level code that was run before Minion Reindex processed any tables.
DBPostCode
nvarchar
Any database-level code that was run after Minion Reindex processed all the tables.
DBPreCodeBeginDateTime
datetime
Date and time the precode started.
DBPreCodeEndDateTime
datetime
Date and time the precode ended.
DBPostCodeBeginDateTime
datetime
Date and time the postcode started.
DBPostCodeEndDateTime
datetime
Date and time the postcode ended.
DBPreCodeRunTimeInSecs
int
How many seconds the precode took.
DBPostCodeRunTimeInSecs
int
How many seconds the postcode took.
ExecutionFinishTime
datetime
Date and time the entire database reindex operation finished.
ExecutionRunTimeInSecs
int
How many seconds the database reindex operation took.


Discussion:

Each row contains the database name, the start and end time of the index maintenance event, and much more.