Indexes & Constraints
Index trouble shooting
sp_helpindex freds
select * from sysobjects where xtype='U'
select * from sysindexes
declare @table_id int, set @table_id =object_id('freds') dbcc showcontig (table_id)
dbcc showcontig (501576825, 501576825)
dbcc dbreindex (freds)
Update statistics freds
++++++++++++++++++++++++++++++++++++++++++++++++
Drop Index
USE pubs
IF EXISTS (SELECT name FROM sysindexes
WHERE name = 'au_id_ind') DROP INDEX authors.au_id_ind GO +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Drop unique or PK
alter table freds drop constraint unx_Freds_lastname
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sp_helpindex freds
|