DF006: Index type (CLUSTERED or NONCLUSTERED) is not specified.

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

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?