Home  >  Article  >  Database  >  SQLSERVER中的鬼影索引

SQLSERVER中的鬼影索引

WBOY
WBOYOriginal
2016-06-07 17:39:10971browse

SQLSERVER中的鬼影索引 看这篇文章之前可以先看一下鬼影记录 了解了解一下SQLSERVER里的鬼影记录 关于鬼影记录的翻译一 关于鬼影记录的翻译二 当删除表中的某一条记录的时候,索引页面的对应记录并不是马上删除,而是标记为鬼影,当提交事务的时候才真正删除

SQLSERVER中的鬼影索引

看这篇文章之前可以先看一下鬼影记录

了解了解一下SQLSERVER里的鬼影记录
关于鬼影记录的翻译一
关于鬼影记录的翻译二

当删除表中的某一条记录的时候,索引页面的对应记录并不是马上删除,而是标记为鬼影,当提交事务的时候才真正删除索引记录,

或者回滚事务,鬼影索引记录才会恢复为正常索引记录,,这样做的目的就是提高了性能

鬼影索引只会出现在非聚集索引页,聚集索引页是没有鬼影索引的

 

建立环境

testghostindexnoncluster(id INT IDENTITY(1,1),NAME VARCHAR(20)) testghostindexnoncluster(name) IX_testghostindexnoncluster ) .

Statement:
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