create table (id int primary key, c1 int, c2 int, ....c1000 int);
i know that RDBMS stores all columns of such one row continuously.if i want to query c400 of only one row, i can locate the row fast, but have to read out the whole file and then find the c400 value, thus when i want to query all the c400 values of the table, that means all the columns and all the rows will be read.
if i create the same table in cassandra and specify the column "id" as partition key.i know c1,c2,...c1000 in one partition will be stored like below :
{c1:1, c2:123, c3:45, ....., c1000: 10}
that's k-v store structure but is still columns continously stored.when i want to read column c400 of one partition, how cassandra fast read it without scaning the other columns?
It scans the columns, thats why it is recommende to avoid wide rows. Wider your rows are slower is your reads. Also wide rows put more pressure on heap.