1

I have just inherrited a "new" SQL Server, and I've run sp_blitz on it.

SP_Blitz warns me about a heap that is being actively queried. The table have just 1 row in it. It is a settings table, so no more rows will ever arrive.

Will adding a Clustered Index gain me anything (except one less row/nag in sp_blitz)?

trincot
  • 317,000
  • 35
  • 244
  • 286
Henrik Staun Poulsen
  • 13,154
  • 4
  • 23
  • 26

1 Answers1

2

If you can guarantee that the table will only ever have one row, then no, not really, but...

I mean, can you?

If you didn't need multiple rows, why build a table?

And even this philosophical discussion took you more time than just putting a clustered index on it and guaranteeing that you won't have problems with it in the future. ;-)

Brent Ozar
  • 13,174
  • 14
  • 68
  • 91
  • @BrentOzare; You are right, I cannot guarantee just one row. But if I add a column (like ID Integer Identity(1,1), then the systems using the database may fall apart. So I've added a clustered key on a random column (that happend to be a tinyint), to stop the nagging. Thank you for your help. – Henrik Staun Poulsen Nov 29 '18 at 13:46