Potential for Data Loss: The steps detailed in the resolution of this article may result in a loss of critical data if not performed properly. Before beginning these steps, make sure all important data is backed up in the event of data loss. If you are unsure or unfamiliar with any complex steps detailed in this article, please contact Product Support Services for assistance.
Slow reading/writing of log values and events might be caused by a fragmented index in the SQL database.
- Vista Server
- SQL log/event data
- SQL Server 2005, 2008
- Microsoft SQL Server Management Studio Express
If the SQL database has become fragmented in its index, these scripts can be run in SQL query software (e.g. Microsoft SQL Server Management Studio Express). Downloaded this software for free at:
Warning: Always take backups of the system prior to performing maintenance on the database.
- Run the following SQL query:
SELECT * FROM sys.dm_db_index_physical_stats (DB_ID(N'taclogdata'),
OBJECT_ID(N'TrendLogValue'), NULL, NULL , 'DETAILED')
WHERE index_level = 0 order by index_id
- Look at "avg_fragmentation_in_percent"
- Or DBCC SHOWCONTIG
- Look at Logical scan fragmentation
- If the database is fragmented, e.g more than 50% run this script to defrag the index: