Guid.CreateSequentialGuid in AL
Dynamics 365 Business Central 2025 Wave 2 introduces Guid.CreateSequentialGuid, a new AL statement that generates sequential GUIDs instead of random ones, reducing index fragmentation and improving performance for GUID-based keys and systemId fields without requiring SQL roundtrips.

post Dynamics 365 Business Central tales, myths, legends. And something serious.
"sequential GUID will be created at NST level (in the middle tier) - no useless roundtrip to SQL"
Key points
- Guid.CreateSequentialGuid, new in Business Central 2025 Wave 2, produces consecutive GUIDs instead of the random ones from CreateGuid.
- GUIDs are generated on the NST middle tier, so no extra roundtrip to SQL Server is needed.
- The main benefit is fewer page splits and less index fragmentation; generation may also be slightly faster.
- The author recommends replacing CreateGuid with CreateSequentialGuid in new or refactored code, since GUIDs are increasingly common in API-facing tables.
Quotes
- “sequential GUID will be created at NST level (in the middle tier) - no useless roundtrip to SQL” (Explains the architectural advantage of the new feature: eliminating database roundtrips improves performance)
- “indexes are reduced in fragmentation compared to randomly generated GUIDs” (Highlights the core benefit: sequential GUIDs maintain index integrity better than random ones)
Context
- Features: Guid.CreateSequentialGuid, sequential GUID generation
- Versions: 2025 Wave 2
Source: Duilio Tacconi, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.