I have table like this.
CREATE TABLE posts ( topic text country text, bookmarked text, id uuid, PRIMARY KEY (topic,id) ); After that I have created secondary index on country and bookmarked as below.
CREATE INDEX posts_country ON posts (country); CREATE INDEX posts_bookmarked ON posts (bookmarked); Now I am querying on single partition with secondary index as below.
select * from posts where topic='cassandra' and country='india' and bookmarked='true' allow filtering; select * from posts where topic='sql' and country='us' and bookmarked='true' allow filtering; My question is if all the query is going to same partition(topic = cassandra or topic=sql) then allow filtering will query all the row or on particular partition? And how performance will be impacted?
Any suggestion on how I can handle such scenario if it is impacting performance.
Thanks.