Collections:
Defragmenting Table Indexes in SQL Server
How To Defragment Table Indexes in SQL Server?
✍: FYIcenter.com
When a table index is fragmented to a certain percentage, you need to defragment the index to maintain its performance level. There are 3 ways to defragment:
1. "ALTER INDEX index_name ON table_name REORGANIZE" - Defragmenting the specified index performed in online mode. No locks applied on affected table. Used for indexes with a small fragmentation percentage.
2. "ALTER INDEX index_name ON table_name REBUILD" - Defragmenting the specified index performed in offline mode by default. It can be performed in online mode. Used for indexes with a large fragmentation percentage.
3. "CREATE INDEX ... WITH (DROP_EXISTING = ON)" - Re-creating the specified index. The definition of the index can be changed.
⇒ "ALTER INDEX ... REORGANIZE" - Defragmenting Indexes in SQL Server
⇐ What Causes Index Fragmentation in SQL Server
2016-11-08, 2349🔥, 0💬
Popular Posts:
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need ...
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows,...
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in ...
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definit...