---
id: post/demiliani-com/12836
type: post
title: "Dynamics 365 Business Central: use sequential GUIDs when possible."
summary: Sequential GUIDs provide significant performance advantages over random GUIDs in Dynamics 365 Business Central by reducing index fragmentation and page splits. Starting with version 27, developers can use the CreateSequentialGuid method to optimize database performance when GUIDs are used as primary keys.
tier: community
language: en
tags:
  - guid
  - performance
  - indexing
  - database
  - al language
  - sql optimization
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:58:22.207Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 7cb747fbffc5a356df50a0faf5534a51bd127f5b688b7c8cbf2c4e8a231ca984
evidence:
  - kind: blog
    url: https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/
    title: "Dynamics 365 Business Central: use sequential GUIDs when possible."
    date: "2025-11-21"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/
    title: "Dynamics 365 Business Central: use sequential GUIDs when possible."
    date: "2025-11-21"
    commit: null
    t: null
    quote: The cost of writing GUID primary keys in a database containing 1,000,000 records is 10x the cost of writing INT primary keys.
  - kind: blog
    url: https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/
    title: "Dynamics 365 Business Central: use sequential GUIDs when possible."
    date: "2025-11-21"
    commit: null
    t: null
    quote: Sequential GUIDs in this case was around 42% better on insert and around 31% better on updating records compared to using random GUIDs.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "12836"
source_id: demiliani-com
source_name: Stefano Demiliani
url: https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/
published_at: "2025-11-21T08:47:55.000Z"
author: Stefano Demiliani
full_text: false
words: 892
quotes:
  - text: The cost of writing GUID primary keys in a database containing 1,000,000 records is 10x the cost of writing INT primary keys.
    why_it_matters: Illustrates why random GUIDs should be avoided for primary keys in large tables
  - text: Sequential GUIDs in this case was around 42% better on insert and around 31% better on updating records compared to using random GUIDs.
    why_it_matters: Provides real-world benchmark data demonstrating concrete performance improvements at scale
code_objects_mentioned: []
systems:
  - platform
  - development
versions_mentioned:
  - "27"
  - 2025 Wave 2
preview:
  embeddable: true
  frame_url: https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/embed/
  image: https://demiliani.com/wp-content/uploads/2025/11/bcnewlogo.png
  image_alt: null
  image_w: 415
  image_h: 413
  site_name: Stefano Demiliani
  favicon: https://demiliani.com/wp-content/uploads/2022/09/sd_wordpress_logo.png?w=32
  probed_at: "2026-10-07T11:51:18.928Z"
---

# Dynamics 365 Business Central: use sequential GUIDs when possible.

[Read the post](https://demiliani.com/2025/11/21/dynamics-365-business-central-use-sequential-guids-when-possible/) · Stefano Demiliani (Stefano Demiliani, MVP) · 2025-11-21 · 892 words · tier community · reviewed (checked by Opus)

> Sequential GUIDs provide significant performance advantages over random GUIDs in Dynamics 365 Business Central by reducing index fragmentation and page splits. Starting with version 27, developers can use the CreateSequentialGuid method to optimize database performance when GUIDs are used as primary keys.

## Key points

- Random GUIDs cause index fragmentation and expensive page splits when used as primary keys, with write costs 10x higher than integer keys on large tables
- Sequential GUIDs insert data in order, keeping related records clustered and enabling the database to append to the index without reorganizing existing pages
- Performance benchmarks showed 42% improvement on inserts and 31% on updates when switching from random to sequential GUIDs with 10 million records
- Sequential GUIDs reduce storage overhead and improve cache locality, though they are more predictable than random GUIDs

## Quotes

- "The cost of writing GUID primary keys in a database containing 1,000,000 records is 10x the cost of writing INT primary keys." (Illustrates why random GUIDs should be avoided for primary keys in large tables)
- "Sequential GUIDs in this case was around 42% better on insert and around 31% better on updating records compared to using random GUIDs." (Provides real-world benchmark data demonstrating concrete performance improvements at scale)

## Context

- Features: CreateSequentialGuid method, GUID generation, Index fragmentation reduction, Primary key optimization, Page split reduction, Cache locality improvement
- Versions: 27, 2025 Wave 2

Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
