Quantcast
Channel: DotNetBlocks - SQL
Viewing all articles
Browse latest Browse all 13

How to Defrag SQL Table Indexes

$
0
0

If you are experianceing any slowdowns with your SQL queries, then it might be time to defrag your database tables. The SQL code listed below will defrag the indexes on a SQL table.

Run this for each table in your query to defrag the table's indexes.

DBCC INDEXDEFRAG (database name, tablename, indexname)


Viewing all articles
Browse latest Browse all 13

Trending Articles