How do I find a disabled index on SQL server 2008

后端 未结 1 833
不思量自难忘°
不思量自难忘° 2021-02-05 00:06

A while back when I was performing some bulk inserts of data into my SQL Server database, I disabled a number of indexes to improve the insert performance. I now need to go bac

1条回答
  •  无人及你
    2021-02-05 00:35

    select
        sys.objects.name as table_name,
        sys.indexes.name as index_name
    from sys.indexes
        inner join sys.objects on sys.objects.object_id = sys.indexes.object_id
    where sys.indexes.is_disabled = 1
    order by
        sys.objects.name,
        sys.indexes.name
    

    0 讨论(0)
提交回复
热议问题