The following query can improve CAREWare performance. This query may take time to run, up to 20 minutes. During that time CAREWare performance may diminish due to resources in SQL being devoted to the task. It may be best to complete this query outside of regular work hours.
USE cw_data
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE'
OPEN TableCursor FETCH NEXT FROM TableCursor INTO @TableName WHILE @@FETCH_STATUS = 0 BEGIN DBCC DBREINDEX(@TableName,'',90) FETCH NEXT FROM TableCursor INTO @TableName END
CLOSE TableCursor DEALLOCATE TableCursor