GUID as primary key and (BIG)INT IDENTITY as clustering key?

Posts   
 
    
Chombatta
User
Posts: 21
Joined: 12-Aug-2008
# Posted on: 23-Mar-2009 19:53:19   

-

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 24-Mar-2009 20:56:54   

It sounds sensible. The only thing I would add is that in a lot of cases, particularly for table which are retrieved as "child" records of a parent record, it can do good things for performance to have the clustered key on the parent ID column.

Other than that, the only real thing to do in these cases is try it for yourself and see how you get on!

Chombatta
User
Posts: 21
Joined: 12-Aug-2008
# Posted on: 25-Mar-2009 17:54:50   

-

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 26-Mar-2009 21:21:46   

They are - but it is all to easy to spend too much time on enjoyable architectural discussion and never actually get round to building the damn thing...simple_smile

Matt

Chombatta
User
Posts: 21
Joined: 12-Aug-2008
# Posted on: 26-Mar-2009 22:03:09   

-

Khou
User
Posts: 46
Joined: 28-Mar-2009
# Posted on: 04-Apr-2009 01:55:42   

Avoid using "GUID" as a primary key! at all cost.

use "int" simple_smile

tastevens avatar
tastevens
User
Posts: 1
Joined: 11-May-2009
# Posted on: 11-May-2009 18:38:48   

Khou wrote:

Avoid using "GUID" as a primary key! at all cost.

use "int" simple_smile

IMO a guid is really only bad if you have no means of generating a sequential guid (for clustered index). I don't feel they are innately evil simple_smile