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 14C02100A8 for ; Mon, 10 Mar 2014 01:02:48 +0000 (UTC) Received: (qmail 47178 invoked by uid 500); 10 Mar 2014 01:02:45 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 47140 invoked by uid 500); 10 Mar 2014 01:02:44 -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 47132 invoked by uid 99); 10 Mar 2014 01:02:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2014 01:02:44 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gareth.o.collins@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qa0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Mar 2014 01:02:40 +0000 Received: by mail-qa0-f44.google.com with SMTP id f11so6208262qae.17 for ; Sun, 09 Mar 2014 18:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=eGWXUZDuQ/zPCLCBsRvpwP40DoexdvyOML6/CmLKXrw=; b=mELe/7CRvSoS+0tfdHMqwV+IXkt8hfT1GrM3YgMoD6L9XXwOYBQLnPyS32qv8/Vc3M /svo6qIq7CV+koOmTu7umVt+KUKnaRJ7KjQygyb2yuk5wrhen7sefzmUER7Nmzt2dNqF NGOlub0TuZdzPv2w50p7ZLtxTK3Eob6GbAkjDGeg+Tm8gMVkQSpfuePubieeoUdUVYjb XEceaWTNL1a6WribYb57VSCxSlR7puatOydWQCHID/Z6WfgHR2tBGO93w+b7LCn0dLxc INLg/NRz2e+MPrS42iISZVK3MCHq9U/2H904JdFZp7JX5xmHXXJ3V5F1fmYdAr8Qjevq UZTw== MIME-Version: 1.0 X-Received: by 10.140.80.176 with SMTP id c45mr35046941qgd.79.1394413339686; Sun, 09 Mar 2014 18:02:19 -0700 (PDT) Received: by 10.96.183.9 with HTTP; Sun, 9 Mar 2014 18:02:19 -0700 (PDT) Date: Sun, 9 Mar 2014 21:02:19 -0400 Message-ID: Subject: Cassandra Memory Question From: Gareth Collins To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have a question about CQL memory usage. I am currently using 1.2.9. If I have a Cassandra table like this (created using Astyanax API): CREATE TABLE table_name ( key text, column1 text, value blob, PRIMARY KEY (key, column1) ) WITH COMPACT STORAGE; and I run a query like this: select key from table_name; Will Cassandra filter the "key" from the row as it goes...or will it get all the rows first (i.e. requiring the whole table in memory), then filter out the "key"? Or will it filter each row as it goes? I ask because I am researching an OOM on our Cassandra system. I believe there must be a query "select * from table_name" (each value blob is very large - I see the value blobs in the Cassandra hprof), which would explain the OOM. However I am told the query is "select key from table_name". If it needs to read the whole table into memory anyway, this would explain the OOM (BTW - I know that this type of query is usually a bad idea without some type of paging). As a supplementary question, is there any way to actually trace the CQL query test? I turned on the tracing described here: http://www.datastax.com/dev/blog/advanced-request-tracing-in-cassandra-1-2 Whilst I found the bad query (I was able to match it to the thread name from the OOM Exception), the trace did not appear to be storing the original query text. The only CQL text I saw in the trace was from those queries done from cqlsh. thanks in advance, Gareth