For my test server, I have no-replication Cassandra 2.1.6 setup:
CREATE KEYSPACE v2 WITH replication =
{'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = false;
CREATE TABLE v2.tiles (
zoom int,
idx int,
tile blob,
PRIMARY KEY (zoom, idx)
)
For each zoom value, there could be tens of millions of small items. For zoom=11, the first idx is in around 100352. When I need to iterate over all items, I allways see this time out error for specific storage cases:
cqlsh:v2> select zoom,idx from tiles where zoom=11 limit 10;
ReadTimeout: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 0 responses." info={'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'}
I get the same error for "zoom=11 and idx > 1000". For idx value closer to the existing items, it gives the right result:
cqlsh:v2> select zoom,idx from tiles where zoom=11 and idx > 100000 limit 10;
zoom | idx
------+--------
11 | 100352
...
It also shows correct empty results when idx is compared with extremelly high value:
cqlsh:v2> select zoom,idx from tiles where zoom=11 and idx > 1000000 limit 10;
zoom | idx | tile
------+-----+------
(0 rows)