Tables with no Primary Key

后端 未结 7 1671
一个人的身影
一个人的身影 2020-12-13 00:17

I have several tables whose only unique data is a uniqueidentifier (a Guid) column. Because guids are non-sequential (and they\'re client-side generated so I can\'t use news

7条回答
  •  庸人自扰
    2020-12-13 00:59

    Nobody answered actual question: what are pluses/minuses of a table with NO PK NOR a CLUSTERED index. In my opinion, if you optimize for faster inserts (especially incremental bulk-insert, e.g. when you bulk load data into a non-empty table), such a table: with NO clustered index, NO constraints, NO Foreign Keys, NO Defaults and NO Primary Key, in a database with Simple Recovery Model, is the best. Now, if you ever want to query this table (as opposed to scanning it in its entirety) you may want to add a non-clustered non-unique indexes as needed but keep them to the minimum.

提交回复
热议问题