Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
Correctness
-
Normal
-
Normal
-
User Report
-
All
-
None
Description
Using Apache Cassandra 3.11.2, defined a table like this:
create table my_table(
_ _partition text,
_ _clustering1 int,
clustering2 text,
data set<text>,
* *primary key (partition, clustering1, clustering2))
and configured slow queries threshold to 1ms in yaml to see how queries passed to cassandra. Query below:
select * from my_table where partition='a' and clustering1= 1 and clustering2='b'
would be like this in debug.log of cassandra:
select * from my_table where partition='a' LIMIT 100> (it means that the two cluster key restriction did not push down to storage engine and the whole partition been retrieved)
but this query:
select * from my_table where partition='a' and clustering1= 1
would be
select * from my_table where partition='a' and clustering1= 1 LIMIT 100> (single cluster key been pushed down to storage engine)
So it seems to me that, we could not restrict multiple clustering keys in select because it would retrieve the whole partition ?!
Attachments
Issue Links
- is fixed by
-
CASSANDRA-15503 Slow query log indicates opposite LTE when GTE operator
-
- Resolved
-