wso2 / wso2/api-platform

Use from UUID v4 to UUID v7 for database entity IDs

Open
#1,252 0 comments 0 reactions 1 assignee View on GitHub

@dushaniw is already working on this.

Since Feb 20, 2026.

Area/Gateway Area/Management Type/Improvement
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Current Limitation

Current: Using uuid.New() (UUID v4) - random 122-bit identifiers
Proposed: Using uuid.NewV7 (UUID v7) - time-ordered UUIDs with Unix timestamp in first 48 bits
Benefits:

  • faster database inserts due to sequential ordering
  • smaller B-tree indexes
  • Better cache locality and reduced page splits
  • Lexicographically sortable by creation time
  • Fully backward compatible (both are 36-character strings)

No database migration required - UUID v7 and v4 coexist safely
No API breaking changes - both are 36-character strings
No client changes needed - transparent to external consumers

Suggested Improvement

Move all database entity ID generation from UUID v4 to UUID v7 to improve database performance through time-ordered, sequential UUIDs that reduce B-tree fragmentation and improve insert performance.

Version

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.