Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server Outbox: Support using uniqueidentifier for messageid to reduce storage #1487

Open
ramonsmits opened this issue May 31, 2024 · 1 comment

Comments

@ramonsmits
Copy link
Member

ramonsmits commented May 31, 2024

Instead of using nvarchar(200) as the type for message id support uniqueidentifier to reduce the storage size of both the rows and the index.

In most environments message id will contain a UUID. It allows a string but that comes as a cost.

A uniqueidentifier is 16 bytes while currently nvarchar(200) results in 36 16 bit chars which results in 72 bytes per row.

This saves 56 bytes per row and would reduces the index size significantly.

@ramonsmits
Copy link
Member Author

ramonsmits commented May 31, 2024

Solution suggestions

Ability to opt-in an assume UUID mode

Having the option to assume uuids would be very useful.

For example:

var outboxSettings = endpointConfiguration.EnableOutbox();
outboxSettings.UseUuidMessageId();

Hybrid table structure

Have 2 table structures and based on the incoming message ID value format to use the UUID table or the string value table

@ramonsmits ramonsmits changed the title SqlServer Outbox: Support using uniqueidentifier for messageid to reduce storage SQL Server Outbox: Support using uniqueidentifier for messageid to reduce storage May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant