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

Skip to first unread message

Fatih Ergin

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.


Avi Kivity

Oct 31, 2023, 9:58:48 AM10/31/23
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
To view this discussion on the web visit

Reply all
Reply to author
0 new messages