Sql-server – Creating a clustered index and want to add log files

sql serversql server 2014

We are adding a clustered index to a 6 billion row table. This is an online operation (15 hours into it).

If we add another log file while this is taking place, does the alter database add log file block command applications?

Best Answer

If we add another log file while this is taking place, does the alter database add log file block command applications?

No, this won't be a "blocking" operation, but there may be a write pause while the space intended for the log file is zeroed out. Instant File Initialization doesn't apply to log files. If you're going to create one, don't make it very large.

The other thing is that log files aren't written to in parallel, the way multiple data files can be. There's no guarantee it'll be used immediately, unless the other log file is completely full.

Hope this helps!