Is it a bad idea to use GUIDs as primary keys in MS SQL?

前端 未结 7 1364
时光说笑
时光说笑 2020-12-23 08:10

We have a system that uses UniqueIdentifier as the primary key of each of the tables. It has been brought to our attention that this is a bad idea. I have seen similar post

7条回答
  •  有刺的猬
    2020-12-23 08:31

    It will be bad if you will need to do joins over large sets (let's say 100,000ths). Been there, suffered that.

    Later Edit : I also encountered an even worse screw-up (can't call it "approach") : storing GUIDs in char(36) columns!!

提交回复
热议问题