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

Creating a clustered index and want to add log files

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

Problem

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?

Solution

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!

Context

StackExchange Database Administrators Q#206271, answer score: 6

Revisions (0)

No revisions yet.