Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08FFE18EBB for ; Tue, 4 Aug 2015 00:32:54 +0000 (UTC) Received: (qmail 19574 invoked by uid 500); 4 Aug 2015 00:32:51 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 19522 invoked by uid 500); 4 Aug 2015 00:32:51 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 19512 invoked by uid 99); 4 Aug 2015 00:32:51 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 00:32:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D376E1A94C4 for ; Tue, 4 Aug 2015 00:32:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KZ7_vrnIgXnC for ; Tue, 4 Aug 2015 00:32:44 +0000 (UTC) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 8F0702D7EA for ; Tue, 4 Aug 2015 00:32:43 +0000 (UTC) Received: by labix3 with SMTP id ix3so11149217lab.0 for ; Mon, 03 Aug 2015 17:32:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=tNE9EfuM3Swo417hVlbnjJ3cz8aUnFnUJ3UH0C66PZM=; b=DzrNFywngx1LjGpq1SRtMH8FWIlZNu1UJbCWXmQfAReSTODg/RtAbmjEA8WmGa0lVm wVnQkijYZ4huVeLL9Rj+XWFNhKkIZfEXx37t2mA9g/3kl4XBZ3qrY2yOCfDi7KBUWKzi lc0wpaEJb2IYN3AnnBbAn2FGNb1QgEKXePKFiQ/9v1ba7WTH9RWuXBR4kvS0CHRiPBSl ldfYAnNIIkdKUr6aOlTYZ55If/Y7macSizR2+rQ17taq/SmN29/0wlF/f65/HxqPLgCs 6hqpFb55XRR+qIBLp/1tPhP/FglHbfwVM4EVEGFqY2xpHmwhxkz8+fTqlKLDZwdQF8vA jAEQ== X-Gm-Message-State: ALoCoQkMfSPHGeIQbfPA3dnIWaBirnwNM8Cz6jeotW0n5tgZE/qRLYliE2GacAOQlTAf4EHmX1Et MIME-Version: 1.0 X-Received: by 10.112.140.132 with SMTP id rg4mr617320lbb.49.1438648363063; Mon, 03 Aug 2015 17:32:43 -0700 (PDT) Received: by 10.114.64.201 with HTTP; Mon, 3 Aug 2015 17:32:42 -0700 (PDT) In-Reply-To: <1438638482794.0340fc3c@Nodemailer> References: <1438638482794.0340fc3c@Nodemailer> Date: Mon, 3 Aug 2015 17:32:42 -0700 Message-ID: Subject: Re: "SELECT *..." query times out on a particular table From: Robert Coli To: "user@cassandra.apache.org" Content-Type: multipart/alternative; boundary=001a11c33b22a333be051c716c64 --001a11c33b22a333be051c716c64 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Aug 3, 2015 at 2:48 PM, Sid Tantia wrote: > Any select all or select count query on a particular table is timing out > with "Cassandra::Errors::TimeoutError: Timed out" > > A =E2=80=9CSELECT * FROM WHERE =3D =E2=80=98=E2=80=99 > on the table works, but a =E2=80=9CSELECT * FROM
LIMIT 1; does no= t 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 =3DRob --001a11c33b22a333be051c716c64 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On M= on, Aug 3, 2015 at 2:48 PM, Sid Tantia <sid.tantia@baseboxsof= tware.com> wrote:
Any select all or select count query on a particular table = is timing out with "Cassandra::Errors::TimeoutError: Timed out"

A =E2=80=9CSELECT * FROM <table> WHERE <partition key> =3D= =E2=80=98<partition key value>=E2=80=99 on the table works, but a = =E2=80=9CSELECT * FROM <table> LIMIT 1; does not work. All other tabl= es and queries work.=C2=A0

Any ideas as to why this might be happening?

This specific question is getting to be a FAQ...<= /div>

Briefly :=C2=A0

1) Cassan= dra operates best when you supply PRIMARY KEY with your request.=C2=A0
2) The worst case scenario is therefore SELECT * FROM Table;
3) While SELECT * FROM Table; is trivial in a non-distributed RDBMS, Cass= andra is ****NOT A NON-DISTRIBUTED RDBMS**** and so it is NOT TRIVIAL IN CA= SSANDRA
4) Cassandra is, instead, a distributed data-store in whi= ch 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 tak= e longer than that, what you'll get is a timeout

The stock remediation for this FAQ is :

a) don&= #39;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

=3DRob

=
--001a11c33b22a333be051c716c64--