IamIC
IamIC

Reputation: 18269

Cassandra 1.1: querying multiple row keys, but not a range

I have read a lot of documentation about building reverse indexes in Cassandra, but I've seen nothing about how to then use these results to fetch the applicable rows.

I know about row slices, but that doesn't apply here. My question is: how does one fetch a large number of specific rows according to the row key?

In pseudo-SQL:

SELECT * FROM table where Primark_Key IN (2, 32, 76, 1000, 2427)

Upvotes: 2

Views: 2860

Answers (2)

Alar
Alar

Reputation: 780

The pseudo-SQL you posted is a valid CQL query, too

Upvotes: 3

BigBen
BigBen

Reputation: 1202

I think multiget_slice is what you're looking for. Takes in a list of keys to go fetch. It's worth bearing in mind that it's not particularly efficient; although often the only choice.

Upvotes: 4

Related Questions