You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sid Tantia <si...@baseboxsoftware.com> on 2015/08/03 23:48:03 UTC

"SELECT *..." query times out on a particular table

Hello,

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?

Re: "SELECT *..." query times out on a particular table

Posted by Bryan Holladay <ho...@longsight.com>.
Check Cassandra logs for tombstone threshold error
On Aug 3, 2015 7:32 PM, "Robert Coli" <rc...@eventbrite.com> wrote:

> On Mon, Aug 3, 2015 at 2:48 PM, Sid Tantia <sid.tantia@baseboxsoftware.com
> > wrote:
>
>> 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
> IN CASSANDRA
> 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
> pagination
>
> =Rob
>
>

Re: "SELECT *..." query times out on a particular table

Posted by Robert Coli <rc...@eventbrite.com>.
On Mon, Aug 3, 2015 at 2:48 PM, Sid Tantia <si...@baseboxsoftware.com>
wrote:

> 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
IN CASSANDRA
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
pagination

=Rob