Should primary keys be always assigned as clustered index

前端 未结 6 979
Happy的楠姐
Happy的楠姐 2021-01-02 07:27

I have a SQLServer table that stores employee details, the column ID is of GUID type while the column EmployeeNumber of INT type. Most of the time I will be dealing with Emp

6条回答
  •  轮回少年
    2021-01-02 07:53

    Since EmployeeNumber is unique, I would make it the PK. In SQL Server, a PK is often a clustered index.

    Joins on GUIDs is just horrible. @JNK answers this well.

提交回复
热议问题