Creating an Invisible Index

查看sqlserver被锁的表以及如何解锁

查看被锁表:

select   request_session_id  
spid,OBJECT_NAME(resource_associated_entity_id) tableName

from   sys.dm_tran_locks where resource_type=‘OBJECT‘

spid   锁表进程

tableName   被锁表名

解锁:

declare @spid  int

Set @spid  = 57 --锁表进程

declare @sql varchar(1000)

set @sql=‘kill ‘+cast(@spid  as varchar)

exec(@sql)

Creating an Invisible Index,布布扣,bubuko.com

时间: 2024-08-08 13:52:56

Creating an Invisible Index的相关文章

Oracle 11g新特性invisible index(不可见的索引)

如果一张表上有十几个索引,你有什么感受?显然会拖慢增.删.改的速度,不要指望开发人员能建好索引.我的处理方法是先监控很长的一段时间,看哪些索引没有用到,然后删除.但删除以后,如果发现某一天有用,那又要重新建,如果是大表,那就有些麻烦.现在11g提供一个新特性,不可见索引,可以建索引设置为不可见索引,CBO在评估执行计划的时候会忽略它,如果需要的时候,设置回来即可. 还有一种用途,你在调试一条SQL语句,要建一个索引测试,而你不想影响其他的会话,用不可见索引正是时候. SQL> drop tabl

Oracle index unusable和invisible的区别

摘录自11g的官方文档:      UNUSABLE Specify UNUSABLE to mark the index or index partition(s) or index subpartition(s) UNUSABLE. The space allocated for an index or index partition or subpartition is freed immediately when the object is marked UNUSABLE. An unu

Oracle index unusable和invisible的差别

摘录自11g的官方文档:      UNUSABLE Specify UNUSABLE to mark the index or index partition(s) or index subpartition(s) UNUSABLE. The space allocated for an index or index partition or subpartition is freed immediately when the object is marked UNUSABLE. An unu

ORACLE不可见索引(Invisible Indexes)

不可见索引概念 不可见索引(Invisible Index)是ORACLE 11g引入的新特性.不可见索引是会被优化器忽略的不可见索引,除非在会话或系统级别上将OPTIMIZER_USE_INVISIBLE_INDEXES初始化参数显式设置为TRUE.此参数的默认值是FALSE.如果是虚拟索引是为了合理.科学新增索引而设计的,那么不可见索引就是为了合理.科学的删除索引而设计的.为什么这样说呢? 因为DBA在维护索引时,我们经常会找出无用或低效的索引,并删除这些索引,在生产环境下,删除索引还是有一

Fulltext Index Study4:management and performance

Only one full-text index is allowed per table. For a full-text index to be created on a table, the table must have a single, unique nonnull column. You can build a full-text index on columns of type char, varchar, nchar, nvarchar, text, ntext, image,

Index的填充属性:FillFactor 和 PAD_INDEX

在Create Index时,必须慎重考虑属性FillFactor 和 PAD_INDEX的设置,这两个属性只在create index 或 rebuild index时起作用,表示Index page(Leaf-Level 或 intermediate-Level)的填充程度.如果设置FillFactor=90,那么SQL Server 在create index 或 rebuild index时,不是将Index Page的空间全部用完,而是只使用接近90%的Page空间,预留10%的空闲空

Fulltext Index Study2:Pupulate

Creating and maintaining a full-text index involves populating the index by using a process called a population (also known as a crawl). 由于创建Fulltext Index 会消耗大量的系统资源,因此Fulltext Index 必须在系统空间的时间进行maintain和crawl.在创建Fulltext Index时,通过指定 CHANGE_TRACKING

Fulltext Index Study1:Usage

一,在创建Fulltext Index的table上,必须使用Key Index(unique, single-key, non-nullable column) CREATE UNIQUE INDEX ui_dbLogID ON [dbo].[DatabaseLog]([DatabaseLogID]); The KEY INDEX must be a unique, single-key, non-nullable column. Select the smallest unique key

QUOTED_IDENTIFIER 选项对 index的影响

SET QUOTED_IDENTIFIER 选项对Index的影响 当创建或修改的index包含computed columns ,必须 SET QUOTED_IDENTIFIER=ON: 当创建或修改Indexed View上的Index时,必须 SET QUOTED_IDENTIFIER=ON: 当创建或修改filtered index时,必须 SET QUOTED_IDENTIFIER=ON: 一,Case 早上,发现用于处理Index fragmentation的Job跑失败了,查看jo