HiveBrain v1.2.0
Get Started
← Back to all entries
snippetModerate

How long will an index take to create?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
createtakelongwillhowindex

Problem

I have a table with over 70 million rows in and I have viewed the execution plan which has identified a missing index. I took a snapshot of data a short while ago and created this index on a local test database (which was fast to create) and the improvement is exactly what is needed in the live system. What I'd like to know is, is there anyway to tell how long it will take to create on the live system?

Solution

Actually - it depends on many things like

  • hardware you use



  • wideness of index



  • current load



  • ...



If index is relatively wide - it can take from minutes to hours.

but

if you have your DB on Enterprise Edition of Sql Server, than you can choose to create an index WITH ONLINE=ON - it will take a little bit more time and space to complete, but will not stop other processing with the table involved

Context

StackExchange Database Administrators Q#10775, answer score: 10

Revisions (0)

No revisions yet.