Is it possible for you to share tracing info for the query? You can enable tracing at cqlsh prompt with command
Cqlsh > TRACING ON Cqlsh> run your query Tracing session info should be printed on screen Tracing will enable us to know where most of the time is spent! From: web master [mailto:socketman2...@gmail.com] Sent: Wednesday, June 21, 2017 1:44 AM To: user@cassandra.apache.org Subject: COUNT I have this schema CREATE TABLE IF NOT EXISTS "inbox" ( "groupId" BIGINT, "createTime" TIMEUUID, "mailId" BIGINT, "body" TEXT, PRIMARY KEY ("groupId","createTime","mailId") )WITH CLUSTERING ORDER BY ("createTime" DESC); This table is frequency updated (250K per second) and each between 10-1000 new record is inserted in each "groupId" per day The problem is I want to count `Unread mails` that based on a TIMEUUID compare, that means I want to count SELECT count(1) FROM inbox WHERE "groupId"=123456 AND "createTime"> specificTimeUUID But this query is inefficiend and slow sometimes If we have <1000 unread message there is no problem but when we have 50K+ unread message we have huge issue What is the best solution for the problem?