A union of curiosity and data science

Knowledgebase and brain dump of a database engineer


Defrag me please........

 
Simplest way to reorganize all of the indexes for the the tables in your database.
 
 
Defragment / Reorganize all tables

EXEC sp_MSforeachtable 'alter index all on ? reorganize'

 
 
 
 

Add comment