Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.
This repository was archived by the owner on May 16, 2025. It is now read-only.

Store user id as UUID in PostgreSQL #2

@gcomte

Description

@gcomte

Since we use Keycloak as our user authentication service, we are pushed into using UUIDs as user ids. These are rather long and therefore not as performant as simple integers, which itself may have to change in order to increase the performance of the matchengine.

But this issue is about a performance-bug that should be fixed even with using UUIDs: We store the UUIDs as VARCHAR(36) in the PostgreSQL database, which is bad practice, and should be fixed.

To achieve this, the DB user_id fields should be set to be of type UUID rather than VARCHAR(36); check out the scripts in the migrations-folder for this.

Then, it would probably make sense to use a UUID-datatype in Rust too, in the file src/storage/models.rs, and get the application and the DB to understand each others datatype.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions