We need an external unique ID for each entity (type). For example: Device, user, Measurement.
ID type is
Our first thought was:
uuid: string @index(exact) @upsert .
Our concern for performance raised the following questions:
stringis the most efficient type? Maybe list of bytes (is it possible?)
- Which index foot print is smaller? hash or exact? The
uuidis 128bit, but it is also saved as UTF8 which is more bloated than binary.
- Should we split the
uuidto types, like
device.uuidand etc, And that to avoid over bloated index?
Other thoughts (of less urgency but interesting non the less).
- split the
uuidand search by the prefix and filter by the suffix:
uuid_prefix => 437e8c3b
uuid_postfix => 0b92-4e9f-b111-f361b22a5888
Or maybe write a custom tokenizer that specialize with