Hi there,
I have a table like below:
CREATE TABLE test ( id text, status int, "desc" text, PRIMARY KEY(id) ) WITH transactions = { 'enabled' : true };
CREATE INDEX test_status ON test (status) INCLUDE ("desc");
When execute insert like below:
Insert Into test(id,status,"desc") values('id',1,'xxx');
Insert Into test(id,status,"desc") values('id',2,'xxx');
Will the below cql would be really executed?
Insert Into test(id,status,"desc") values('id',1,'xxx');
Insert Into test_status(status,id,"desc") values(1,'id','xxx');
Insert Into test(id,status,"desc") values('id',2,'xxx');
Insert Into test_status(status,id,"desc") values(2,'id','xxx');
This will lead to one row in test but two rows in test_status
I ask this because I have a similar table like this,
and encounter Server Error DeadLine
when execute :
select * from test where status=1 limit 2;
However there’s only 3700 rows: select count(*) from test;
So use update clause could fix this case, right?
update test set id='id' and status=1 and "desc" ='xxx';
update test set id='id' and status=2 and "desc" ='xxx';
Thanks