1

I saw this comment:

"Late last week Azure launched a preview of the latest version of Azure SQL DB and in that preview, NewSequentialID is now supported, along with many other features that were previously not available."

but I have been unable to find any details of this. Has anyone else found anything that will confirm SQL Azure now supports newsequentialid ?

Alan2
  • 23,493
  • 79
  • 256
  • 450

1 Answers1

2

NEWSEQUENTIALID() is supported in the latest V12 server version of SQL Database. The documentation can be found here: https://msdn.microsoft.com/en-us/library/ms189786.aspx.

It is the same functionality as in SQL Server which is why there is not a separate topic for SQL Database.

As in SQL Server the places where you can use NEWSEQUENTIALID() are very restricted and the behavior is not always intuitive. If not absolutely necessary for your scenario (if it is, can you share it? I would be interested to understand it), you should consider using NEWID().

Jan Engelsberg
  • 1,067
  • 6
  • 8
  • Hello Jan, I am using newsequentialid() as the primary key in my clustered table. I understood there were performance problems with using newid() so I thought this would help. I would be interested to hear your thoughts on this. Also I may open up another question specifically for this. Thanks in advance. – Alan2 Apr 08 '15 at 06:45
  • Hi Alan, check out the answers in this post [link](http://stackoverflow.com/questions/1587185/newid-vs-newsequentialid-what-are-the-differences-pros-and-cons). Using sequential ids can reduce index fragmentation which can lead to better read performance. However your insert performance might degrade because you get hot pages as all inserts happen at the end of the index. – Jan Engelsberg Apr 08 '15 at 19:22