You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "onmstester (Jira)" <ji...@apache.org> on 2020/01/13 05:28:00 UTC

[jira] [Commented] (CASSANDRA-15500) only partition key push down when multiple cluster keys restricted in where clause

    [ https://issues.apache.org/jira/browse/CASSANDRA-15500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014027#comment-17014027 ] 

onmstester commented on CASSANDRA-15500:
----------------------------------------

with tracing on, cqlsh logs that "read 1 live rows... " for the query with both clustering key restricted but the whole partition (with no clustering key restriction) has 12 live rows, so i suppose that clustering key restrictions been pushed down to storage engine.

> only partition key push down when multiple cluster keys restricted in where clause
> ----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15500
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15500
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: onmstester
>            Priority: Normal
>
> 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 ?!_



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org