Say, I have a table that looks something like this: (it's an example)
CREATE TABLE testing.friend_requests (
sender_uuid text,
receiver_uuid text
);
CREATE TABLE testing.users (
uuid text
);
Here, I'm using the UUIDs of the users to reference them in the friend_request
table. This means I would need to do something like SELECT * FROM testing.users WHERE uuid = sender_uuid OR uuid = receiver_uuid;
(also an example) to get the user data of both users.
Could there be a better way for this using ScyllaDB? For example, is there a way to directly refer to the user row from a different table?
This is going to be used in a project which should be able to take millions of RPM/WPM (using a big cluster, among other things), so it would be appreciated if it were possible to reduce the database queries as much as possible.