檢視每一個索引的片段(Index fragmentation)資訊
http://sharedderrick.blogspot.com/2010/ ... ation.html
Microsoft SQL Server 2000 Index Defragmentation Best Practices
http://technet.microsoft.com/zh-tw/libr ... us%29.aspx
重新組織和重建索引
http://technet.microsoft.com/zh-tw/libr ... 89858.aspx
sys.dm_db_index_physical_stats (Transact-SQL)
http://technet.microsoft.com/zh-tw/libr ... 88917.aspx
ALTER INDEX (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms188388.aspx
Using Covering Indexes to Improve Query Performance
http://www.simple-talk.com/sql/learn-sq ... rformance/
代碼: 選擇全部
CREATE NONCLUSTERED INDEX [ix_Customer_Email] ON [dbo].[Customers]
(
[Last_Name] ASC,
[First_Name] ASC
)
INCLUDE ( [Email_Address]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
http://stackoverflow.com/questions/3168 ... sql-server
代碼: 選擇全部
SELECT
i.name AS IndexName,
s.used_page_count * 8 AS IndexSizeKB
FROM sys.dm_db_partition_stats AS s
JOIN sys.indexes AS i
ON s.[object_id] = i.[object_id] AND s.index_id = i.index_id
WHERE s.[object_id] = object_id('Vlog')
ORDER BY i.name
http://odetocode.com/articles/70.aspx