A very new apology for Cassandra if the question is simple.
I created a table:
create table ApiLog ( LogId uuid, DateCreated timestamp, ClientIpAddress varchar, primary key (LogId, DateCreated));
This work is wonderful:
select * from apilog
If I try to add a where clause with DateCreated as follows:
select * from apilog where datecreated <= '2016-07-14'
I get this:
Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING
From the other questions cited here in SO, and from the datastax tutorials, I understand that since the dataset column is a clustering key, it can be used to filter data.
I also tried to create an index, but I got the same message. And I tried to remove the DateCreated from the primary key and use it only as an index, and I still get the same answer:
create index ApiLog_DateCreated on dotnetdemo.apilog (datecreated);
Jason source share