August 11, 2011 at 4:14 pm
Hi,
i have bank database in that 10 tables is there i want to know each table wich index is using i want know...........can you plz help me some one
Raj
August 11, 2011 at 5:03 pm
Hopefully the following article will be of help to you.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 12, 2011 at 2:27 am
Query sys.indexes join to sys.tables
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 12, 2011 at 2:37 am
For each table you can run the below.
EXEC sp_helpindex N'schema.table';
GO
Thanks
Chris
August 12, 2011 at 5:04 am
hi, this Query may help you.
SELECT
i.name AS IndexName,
SUM(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('dbo.TableName')
GROUP BY i.name
ORDER BY i.name
August 12, 2011 at 5:12 am
Are you reffering to unused indexes or something similar?
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply