I've seen a few questions of a similar problem already but none of them seem to apply to my particular case.
I have this table which contains the timestamp as primary key and a random value:
CREATE TABLE IF NOT EXISTS rand_keyspace.rands (
timestamp bigint,
randnumber float,
PRIMARY KEY (timestamp));
I would like to retrieve the last 10 inserted rows.
SELECT * FROM rand_keyspace.rands ORDER BY timestamp DESC LIMIT 10;
and I'm getting the classic error:
InvalidRequest: Error from server: code=2200 [Invalid query] message="ORDER BY is only supported when the partition key is restricted by an EQ or an IN."
Note that I have no intention of clustering by randnumber or ever querying but that column.