domingo, 21 de agosto de 2022

How to show INDEXES on Microsoft SQL Server / Azure SQL Database

To show the indexes on a Table, use the sp_helpindex:

EXEC sp_helpindex N'MyTableNameHere'

For example:

EXEC sp_helpindex N'dbo.CMS_Article'

This will produce a table with the INDEXES listed:

If indexes have been set by using the NORECOMPUTE option of UPDATE STATISTICS, that information is included in the index_description column.

sp_helpindex exposes only orderable index columns; therefore, it does not expose information about XML indexes or spatial indexes.

See the Documentation:

Nenhum comentário :