Monitoring Create Index

  • Hi Experts,

    We have created a job which creates Clustered as well as non clustered indexes on a table.

    I was requested to let the client know the status of the job. The table size is 1 TB.

    I wanted to check what exactly is going on for the particular SPID.

    I could see in sys.dm_exec_sql_text that the following insert command was running:

    insert into <table> select * from <table>

    Could you please let me what part of Create Index is this?

    Version: SQL Server 2008 R2

    Thanks,

    Dev

  • That's the actual creation of the index. I believe the percent_complete column in sys.dm_exec_requests is updated for CREATE INDEX so you can monitor it using that. I use Adam Machanic's sp_WhoIsActive which displays it.

  • Hi Jack,

    Thanks for your reply. percent_complete in sys.dm_exec_requests does not show for CREATE INDEX. The job got completed.

    I took a different approach to monitor. I checked sp_helpindex to check how many indexes got created.

    But I am still wondering what that Insert command was doing while creating indexes.

    Thanks,

    Dev

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply