cancel
Showing results for 
Search instead for 
Did you mean: 

Cleaning Fragmented Indexes In The Nintex Content Database

TOPIC
How to clean fragmented indexes in the Nintex Content Database
INSTRUCTIONS

The t-sql below will retrieve the fragmentation on the indexes for a database named DATABASENAME. You will want to replace 'DATABASENAME' with the name of your database. 

Use DATABASENAME GO SELECT OBJECT_NAME(i.object_id) AS TableName ,i.name AS TableIndexName ,phystat.avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat inner JOIN sys.indexes i ON i.object_id = phystat.object_id AND i.index_id = phystat.index_id WHERE phystat.avg_fragmentation_in_percent > 10

You can also use the PowerShell Script here: How to quickly check the health of your Nintex Workflow SQL Indexes  

Once the fragmentation has been found you can plan accordingly for reorganizing/rebuilding the indexes. The link below provides further information on how to reorganize/rebuild these indexes.

MSDN: Reorganize and Rebuild Indexes

ADDITIONAL INFORMATION
Fragmentation of indexes can occur when there are a large number of read-write / delete operations occuring on a database. This can cause logical pages to be out of place with where they should be located in within the data file. Fragmented databases can cause slow query times and SQL performance degradation. Index Fragmentation should be kept under 10%. If you index is 5%-30% then you can reorganize. If it is >30% you will need to rebuild.
RELATED LINKS
Labels: (1)
Version history
Revision #:
1 of 1
Last update:
‎12-18-2018 02:58 PM
Updated by: