磁盘负责三方面,一个将数据写入到日志文件ldf中,然后在check point后写入到mdf, 接着就是大量的读操作。
先写入ldf,是因为sql server的预写日志机制引起的,此机制保证了数据在写入到mdf中前,一定会在ldf中保留一份,这样以后恢复等操作都可进行,故可以说,影响写性能的主要是写入到ldf中的操作。磁盘一边负责随机取数据,一边负责写入数据,磁头转来变去,性能低下,而将ldf文件放在不同的磁盘中,就独立了写操作。
注意:磁盘应是物理上的。
Other logical drive will not benefit because ultimately, it’s the same drive controller and the same physical disc. Hence, if the heads are busy doing random reads for a logical drive D, they won’t be able to perform serial writes on logical drive E on the same physical drive.
Hence, the log should be given the priviledge of it’s own separate physical drive.
引自:
Performance Best practice – Transaction log must on a different drive. But WHY?
Write-Ahead Transaction Log
【版权声明】
本站部分内容来源于互联网,本站不拥有所有权,不承担相关法律责任。如果发现本站有侵权的内容,欢迎发送邮件至masing@13sy.com 举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。
上一篇: 修改列类型复制索引