DF006: Index type (CLUSTERED or NONCLUSTERED) is not specified.
Last modified: May 28, 2025
The topic describes the DF006 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
Index type (CLUSTERED or NONCLUSTERED) is not specified.
Description
In the CREATE INDEX statement, it is recommended to explicitly specify the type of an index: CLUSTERED or NONCLUSTERED.
Additional information
This ensures clarity and precision in the index definition, helping to avoid confusion and potential errors during index creation. Additionally, explicitly stating the index type allows for better control over the physical organization of data and can influence query performance and storage considerations.
Noncompliant code example
CREATE INDEX ByFirstName ON dbo.Customers(FirstName)
Compliant solution
CREATE NONCLUSTERED INDEX ByFirstName ON dbo.Customers(FirstName)
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.