Originally from the User Slack
@hamonica: I’m using a composite partition key.
If I have two composite partition keys, can I use the IN clause for each key?
Or can I only use the IN clause for one key in a composite partition key?
PRIMARY KEY ((created_at, service_name), name, end_time_unix_nano)
What I want is not this:
SELECT *
FROM table_name
WHERE (columnA, columnB) IN ((value1, value2), (value3, value4));
Instead, I want to retrieve the results with a query like this:
SELECT * FROM sample WHERE create_at IN ('c1', 'c2') AND service_name IN ('s1', 's2');
Additionally, is there a limit to the number of values that can be included in the IN clause?
@hamonica: ah… um…, is range query only possible on the first partition key?
@avi: No, use WHERE token(pk) >= ? AND WHERE token(pk) < ?
to delimit the ranges
@hamonica: @avi Thank you. I already found that information and am applying it.
I’m trying to use it like a time-series database, but it seems like scylladb a lot of thought is needed to apply it to our scenario.
Anyway, thank you so much for the response.