r/SQLServer • u/wicherqm • Mar 11 '26
Question UUIDv7 in SQL SERVER 2025
Why is UUIDv7 still not natively supported in SQL Server 2025?
Are there any plans to add it in a future release or service pack for this version?
It seems like a relatively low-fruit feature with meaningful performance benefits. Maybe I'm missing something - are there any good alternatives available in SQL Server 2025?
4
Upvotes
5
u/Black_Magic100 Mar 12 '26
Can you describe the meaningful performance benefits on the database side? With proper fill factor, UUIDv4 ignores the hot identity insert issue you may encounter when doing in-order INSERTs, which you will have with UUIDv7 although it can be reduced probably with optimzie_for_sequential_key (I don't have much experience with that setting personally). I'm pretty sure Jeff Modem covered GUIDs in his Black Arts of Indexing video, but he was using NEWSEQUENTIALID which is not the same as UUIDv7 although the same idea
10
u/da_chicken Mar 11 '26 edited Mar 12 '26
NEWSEQUENTIALID()is "UUIDv7 at home".However, keep in mind that the first RDBMS to natively support UUIDv7, PostgreSQL 18, implemented UUIDv7 and released at the end of last September. That's 6 months ago. It's actually barely over 4 months ago. And, PostgreSQL tends to implement new features fairly quickly.
Unless there's a major reason that UUIDv7 is needed to replace
NEWSEQUENTIALID(), I wouldn't bet on seeing it in SQL Server until 2030 or later.2
u/cammoorman Mar 12 '26
Programmer here that has done some C# SQL Assembly coding
Each SQL server is released around a core .net framework and is not really updated with features around that language until another full release.
TLDR; Take a full SQL release after .net gets that feature in its core.
2
u/OddElder Mar 12 '26
I didn’t know UUIDv7 even existed until this post. Now I’m salty that it’s not available in SQL Server too. :D
The time based sorting built in with the randomness of a uuid seems like SUCH a win all around for PK indexing — that is, if creation date being visible is not a security concern (in which case a fallback to uuid v4 is always available and interchangeable with uuid7 from what I’m reading).
Now I’m going to go have to set myself an alert to check on this every year to see if it’s been made available.
-1
u/No_Resolution_9252 Mar 12 '26
who cares? SQL Server introduced sequential uuids over 20 years ago.
There are no performance benefits to be realized. you are almost certainly designing and maintaining your indexes wrong. You don't why you even need a sequential uuid.