cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Coli <>
Subject Re: "SELECT *..." query times out on a particular table
Date Tue, 04 Aug 2015 00:32:42 GMT
On Mon, Aug 3, 2015 at 2:48 PM, Sid Tantia <>

> Any select all or select count query on a particular table is timing out
> with "Cassandra::Errors::TimeoutError: Timed out"
> A “SELECT * FROM <table> WHERE <partition key> = ‘<partition key value>’
> on the table works, but a “SELECT * FROM <table> LIMIT 1; does not work.
> All other tables and queries work.
> Any ideas as to why this might be happening?

This specific question is getting to be a FAQ...

Briefly :

1) Cassandra operates best when you supply PRIMARY KEY with your request.
2) The worst case scenario is therefore SELECT * FROM Table;
3) While SELECT * FROM Table; is trivial in a non-distributed RDBMS,
Cassandra is ****NOT A NON-DISTRIBUTED RDBMS**** and so it is NOT TRIVIAL
4) Cassandra is, instead, a distributed data-store in which most operations
default to a timeout of fewer than a single digit number of seconds
5) So if SELECTing * FROM your Table is likely to take longer than that,
what you'll get is a timeout

The stock remediation for this FAQ is :

a) don't use Cassandra for cases where you need to SELECT * FROM Table
b) if you do have to use it for such a case, use a driver with internal


View raw message