cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micha <>
Subject secondary index on static column
Date Fri, 27 Jan 2017 08:44:37 GMT

I'm quite new to cassandra and allthough there is much info on the net,
sometimes I cannot find the solution to a problem.

In this case, I have a second index on a static column and I don't
understand the answer I get from my select.

A cut down version of the table is:

create table demo (id text, id2 bigint static, added timestamp, source
text static, dest text, primary key (id, added));

create index on demo (id2);

id and id2 match one to one.

I make one insert:
insert into demo (id, id2, added, source, dest) values ('id1', 22,
'2017-01-28', 'src1', 'dst1');

The "select from demo;" gives the expected answer of the one inserted row.

But "select from demo where id2=22" gives 70 rows as result (all the same).

Why? I have read

but I don't get it...

thanks for answering,

View raw message