July 20, 2004 at 12:05 pm
Hi everyone,
I want to find the list and size of the top 10 indexes in a database. Does anyone have a query that I can use? Thank you!
July 20, 2004 at 12:30 pm
Actually, I had another query that showed the top 10 tables in a database (thanks to a poster on this board!). I changed that and now I am getting the top 10 indexes. Is this query correct?
SELECT top 10 used AS "# of Pages", rows AS "# of Rows", (used * 8) / 1024 AS "# of MB",
name as IndexName, object_name(id) AS TableName
FROM sysindexes WHERE indid >= 2 and indid <= 250
order by used DESC
And one more question, how can I find out which columns of the tables the index is for? Thanks in advance for your help.
July 20, 2004 at 6:47 pm
sp_helpindexes
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply