Meow Meow
Meow Meow

Reputation: 676

How to disable a clustered index by hint in SQL Server?

I have a table which has a PK on the ID column. A clustered index on the PK column causing huge cost when where clause has conditions for columns except the ID.

Can I manually disable the index by using a hint?

Upvotes: 1

Views: 553

Answers (1)

Jodrell
Jodrell

Reputation: 35746

No

Read these answers

Since the data is actually stored in the order of the clustered index it is fundamental and intrinsic to how the query is processed. You cannot avoid the clustered index and nor should you want to.

I accept your query is slow but it is not because the query engine is using the clustered index. It may be true that you could have a better clustered index.


Hint: For a specific answer, more useful to you, you'll need to ask a more specific question.

Upvotes: 1

Related Questions