SQL Response - 1.1
Learning SQL Response - 1.1
About fragmented indexes
The Fragmented index recommendation is raised when SQL Response determines that the percentage of logical fragmentation of any one index in a monitored database, based on running the DBCC SHOWCONTIG command, exceeds a specified percentage.
Causes of fragmentation
In the normal operation of any production SQL Server, as INSERTs, UPDATEs, and DELETEs are made to tables (and their indexes), rows become fragmented (scattered throughout the database, in addition to leaving empty spaces). Fragmentation requires SQL Server to perform extra work when accessing indexes, which in turn can lead to slower performance. Because of this, it is a best practice to remove this fragmentation on a regular basis.
If you have created an Index Rebuild or Reorganize job, and are still seeing this recommendation, it is possible the jobs are failing. If this is the case, a Job failure or Job did not start alert for that job will also be raised by SQL Response.
Resolving a fragmented index
There are two ways to resolve index fragmentation:
- Use the
ALTER INDEXcommand with theREBUILDoption - Use the
ALTER INDEXcommand with theREORGANIZEoption
One or the other of these commands should be executed as part of a regular index defragmentation plan, either executed as a SQL Server Agent job or via a Maintenance Plan.
If an index is heavily fragmented (>30%), then the REBUILD option should be used because it physically rebuilds all of the indexes. However, this is a resource-intensive process that can affect your server's performance and temporarily block users from accessing their data. If you have the Enterprise version of SQL Server, the REBUILD option has an ONLINE option that reduces a lot of these problems.
If an index is not heavily fragmented (between 5% and 30%), then you can use the REORGANIZE option instead. This option does not do as thorough a job as the REBUILD option does, but is it much more lightweight and has minimal impact on an active production database.
Ideally, you should only REBUILD or REORGANIZE indexes that are fragmented. Not all indexes become fragmented (for example, because they are read-only or little used), and defragmenting them uses unnecessary resources. Unfortunately, it is not all that easy to write Transact-SQL code that goes through every index, determines its level of fragmentation, and then performs the appropriate type of defragmentation only on those indexes that need it. Because of this, many DBAs run either REBUILD or REORGANIZE on all of a database's indexes at the same time.
Links to more information
Microsoft SQL Server 2000 Index Defragmentation Best Practices
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
SQL Server Performance.com : Understanding SQL Server's DBCC SHOWCONTIG
http://www.sql-server-performance.com/articles/dba/dt_dbcc_showcontig_p1.aspx
SQL Server Performance.com : Tips for rebuilding indexes
http://www.sql-server-performance.com/tips/rebuilding_indexes_p1.aspx
MS SQL City : Reducing SQL Server Index Fragmentation
http://www.mssqlcity.com/Articles/Adm/index_fragmentation.htm
Was this article helpful?
SQL Response
- Troubleshooting Computer Unreachable and Access Is Denied Error Messages
- SQL Response Security Setup
- Upgrading from Version 1.0 to 1.1 where the SQL Response Client and Alert Repository exist on the same machine
- Moving your Alert Repository Data
- Licensing SQL Response on a clustered SQL Server
- Server licenses may show "trial period has expired"
- How do I use the SQL Response client across domains?
- Where are the SQL Response data files stored?
- SQL Response client not connecting to Alert Repository
- The alert details are not recorded and SQL Response reports "Alert is still being written" when viewing an alert or multiple alerts
- Error when connecting to the Alert Repository using Windows 7
- Alert Repository transferring large amounts of data from the SQL Server
- Log files
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Response
- Migrating your Alert Repository from Windows 2000
- Tips for configuring SQL Response in your network environment
- SQL Response release notes - version 1.xx
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

What does SQL Response monitor?
Further information on recommendations