Let's consider the following table
CREATE TABLE base_table(
partition_key uuid,
clustering_key1 uuid,
clustering_key2 uuid,
regular text,
PRIMARY KEY((partition_key), clustering_key1, clustering_key2)
);
Prior to Cassandra 2.2, it was not possible to do queries like this :
SELECT * FROM base_table
WHERE partition_key=<UUID1>
AND clustering_key1 IN (<UUID2>,<UUID3>)
AND clustering_key2 < UUID4
Indeed, a clustering key could be restricted only if the preceding one was restricted by an equal relation.
Since Cassandra 2.2, it is possible but does somebody know if there are some caveats doing it ? What performance can be expected, same as if there was no IN clause (or close to) ? Does it scale like an equal relation ?
More, Cassandra 3.X new storage engine may have taken into account optimizing such requests... if anybody has ideas on this :)
Thanks !