Home > Database > Mysql Tutorial > body text

SQL Server中In-Flight日志究竟是多少

WBOY
Release: 2016-06-07 17:42:46
Original
908 people have browsed it

在SQL Server中,利用日志的WAL来保证关系数据库的持久性,但由于硬盘的特性,不可能使得每生成一条日志,就直接向磁盘写一次,因此日志会被缓存起来,到一定数据量才会写入磁盘。这部分已经生成的,却没有写入磁盘的日志,就是所谓的In-Flight日志。 在SQL

    在SQL Server中,虚拟主机,利用日志的WAL来保证关系数据库的持久性,但由于硬盘的特性,不可能使得每生成一条日志,就直接向磁盘写一次,因此日志会被缓存起来,到一定数据量才会写入磁盘。这部分已经生成的,却没有写入磁盘的日志,就是所谓的In-Flight日志。

    在SQL Server中,In-Flight的日志的大小取决于两个因素,根据Paul Randal的说法,香港虚拟主机,In-Flight日志不能超过60K,因此In-Flight的日志最大是60K,此外,如果In-Flight日志没有到60K,美国服务器,如果发生了Commit或Rollback,那么直接会写入磁盘。因此日志最小为512字节,最大为60K,以512字节为单位进行增长。下面我们来看一个例子。

 

    我们首先建立一个简单的表,循环向其中插入10W的数据,该语句会生成大量的日志,如代码清单1所示:

@i INTEGER SET @i = 0 WHILE ( @i

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!