ClickRex

THOUGHTS FROM AN OVERLY IMPULSIVE DEVELOPER

0 notes &

Rebuilding All Indexes on Azure

Reorganising and rebuilding indexes is crucial to maintaining database performance; however on SQL Azure indexes are much less transparent & the standard “DBCC DBREINDEX” approach isn’t supported on the platform.  

However; Chris Pietschmann has posted an article on rebuilding all the indexes in a database here.  The operation to rebuild an index is:

In order to do this for all indexes within the database; you can use the below script (This is a modified version of Chris’s which supports tables that are on different schemas).

Filed under Indexes SQL Azure SQL Azure