/* * Query to test the speed of a ProWatch database to see whether archiving of events is being performed. * The time it takes to run the 2nd select command shows how long it will take to receive alarms in Immix. * (if it is too slow because archiving is not being performed then an index will need to be created on the REC_DAT column) */ DECLARE @Date DATETIME SELECT TOP 1 @Date=[REC_DAT] FROM [EV_LOG] ORDER BY [REC_DAT] DESC SELECT * FROM [EV_LOG] WHERE [REC_DAT]>@Date //Use this select instead of the 2nd one above if you have made an index on the REC_DAT column and want to test it works (replace EV_LOG_IMMIX with the index name if your named yours differently) //SELECT * FROM [EV_LOG] WITH (INDEX(EV_LOG_IMMIX)) WHERE [REC_DAT]>@Date