Performance Implications of Using 48-bit vs. 64-bit int IDs as Primary Key

33 views
Skip to first unread message

Fatih Ergin

<fatih1ergin@gmail.com>
unread,
Oct 31, 2023, 9:13:32 AM10/31/23
to ScyllaDB users
Hi team,

I'm considering the use of two different timestamp based ID generators for: one generates 48-bit integer IDs, the other 64-bit integer IDs.

It's a realtime messaging application requires "high" throughput and it has 200k message per day with ~2kb of message payload. ID is the primary key of the messages table.

My question is the potential impact on performance, especially in terms of compaction, caching, and sorting.

Reads and Compactions: Would the smaller size of 48-bit integers result in noticeable improvements in read/write operations during compactions?

Caching: Considering ScyllaDB's caching mechanism, would 48-bit integers improve cache hit rates due to their smaller size?

Data Model: If these IDs are used as clustering columns in range queries, would there be a notable performance difference between the two sizes?

I "guess" that the actual difference might be minimal or dependent on the specific use-case. However, any insights or experiences would be helpful.

Regards,
Fatih

Avi Kivity

<avi@scylladb.com>
unread,
Oct 31, 2023, 9:58:48 AM10/31/23
to scylladb-users@googlegroups.com
The difference would be unmeasurable, so go with what's more natural for your workload.
--
You received this message because you are subscribed to the Google Groups "ScyllaDB users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scylladb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scylladb-users/4994d661-e220-449c-953c-ff7484cbac61n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages