Skip to content

[Enhancement] Use UUIDv7 for QueryId #25534

@dolfinus

Description

@dolfinus

QueryId is currently generated as {timestamp:yyyyMMdd_HHmmss}_{index:05}_{coordinator_id:05}. Could it be changed to match RFC 9562 UUID versions 6-8?

Benefits are:

  • UUIDv7 format implementations already uses timestamp + counter + random part for generation, so the value ordering and uniqueness should be just the same. More than that, UUIDv7 timestamp precision is milliseconds compairing to whole seconds of QueryId.
  • UUID is 128 bit compairing to 216 bit of string in UTF-8 encoding.
  • Better support by third-party systems. Imagine storing audit logs in some database, and user who wants to filter data by queryId field. UUID data type is quite common in modern DBMS, and index takes less space than same index for a string field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions