SQL Server: How do we track the progress of the CREATE INDEX command?

920    Asked by ankur_3579 in SQL Server , Asked on Apr 16, 2021

 SQL Server 2014, Std Ed  I have read that percent_complete in dm_exec_requests does not work for CREATE INDEX, and in practice, percent_complete sticks at 0. So that doesn't help. I currently use the method below, which at least shows me movement (that the index creation is not blocked). But I have no idea if I am 10% through the process or 99%. I tried the method described here: https://dba.stackexchange.com/a/102545/6229 but it shows a clearly wrong est completion time (it basically shows 'now' for a 60+ minute process that I am 10 min into) How can I get some help?

 

Answered by Claudine Tippins
I guess we can remove the @SPID variable with a reference to sys.dm_exec_requests: 
Example of SQL Server CREATE INDEX
The SQL statement shown below creates an index named "idx_lastname" on the "LastName" column in the "Persons" table:
However, if you want to create an index on a combination of columns, you can list the column names within the parentheses, separated by commas:


Your Answer

Interviews

Parent Categories