[ https://issues.apache.org/jira/browse/CASSANDRA-4386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14877264#comment-14877264 ]
Steven Warren edited comment on CASSANDRA-4386 at 9/19/15 6:44 PM: ------------------------------------------------------------------- I'd like to make a case for raising the priority of this JIRA. I have a use case which I don't think should be that unusual and where a secondary index IN clause would be fantastic. I have a set of wide rows ordered by an index (cluster key). I have a secondary key on the primary column value. If I want to look up by primary column value among the set of wide rows I have to issue a query to each one: select value from x where pk = :y and primary = :value This is fine, the set of wide rows tends to be 1-100 rows so it's 1-100 parallel queries. However, without the in clause it's 1-100 parallel queries per primary column value I want to specify. It would be much better to just write: select value from x where pk = :y and primary in :values That gives me a fix number of queries to execute equal to the number of wide rows in the set. This also should perform well since I'm specifying the partition key and sending the parallel queries to the partition server for each one. was (Author: swarren): I'd like to make a case for raising the priority of this JIRA. I have a use case which I don't think should be that unusual and where a secondary index IN clause would be fantastic. I have a set of wide rows ordered by an index (cluster key). I have a secondary key on the primary column value. If I want to look up by primary column value among the set of wide rows I have to issue a query to each one: select value from x where pk = :y and primary = :value This is fine, the set of wide rows tends to be 1-100 rows so it's 1-100 parallel queries. However, without the in clause it's 1-100 parallel queries per primary column row I want to retrieve. It would be much better to just write: select value from x where pk = :y and primary in :values That gives me a fix number of queries to execute equal to the number of wide rows in the set. This also should perform well since I'm specifying the partition key and sending the parallel queries to the partition server for each one. > Allow cql to use the IN syntax on secondary index values > -------------------------------------------------------- > > Key: CASSANDRA-4386 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4386 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Jeremy Hanna > Assignee: Benjamin Lerer > Priority: Minor > Labels: cql > > Currently CQL has a syntax for using IN to get a set of rows with a set of > keys. This would also be very helpful for use with columns with secondary > indexes on them. Such as: > {code} > select * from users where first_name in ('françois','frank'); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)