Home / Code Snippets / Blog article: SQL Server 2008 – Get All Indexes In A Database

| RSS

SQL Server 2008 – Get All Indexes In A Database

March 24th, 2009 | No Comments | Posted in Code Snippets

You’ve got to love sys views in SQL Server. While learning about performance tuning on SQL Server 2008 I wanted to get a list of all Indexes on my database and the answer was as simple as it can be. Here i a statement which can be used to get a list of all indexes on a database.

SELECT * FROM sys.indexes

And here is the partial output from AdventureWorks database.

sys.indexes

Leave a Reply 4138 views, 4 so far today |

Leave a Reply