As the question states, what are the downsides of using NewSequentialID as the default value of a table vs NewID()? The obvious advantage is that it won't fragment our index as much.
Is there any concern for ever maxing out the sequence?
As the question states, what are the downsides of using NewSequentialID as the default value of a table vs NewID()? The obvious advantage is that it won't fragment our index as much.
Is there any concern for ever maxing out the sequence?
I don't see how a default value on a field could really be a disadvantage.
If you want to control the ids of some records before you insert them, it can be handy to use NEWID()
instead of the default sequential id (so you can generate the records and their associations before you interact with the database, and you won't have to query it afterwards to get the ids back). Although the two are not mutually exclusive...
As granadaCoder said, the sequential ID could be inferred, but IMO the benefit is so great in term of performance and maintenance that it would be a mistake not to use it.
newsequesntialid
is not supported by Azure