incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Collins <>
Subject Cassandra Memory Question
Date Mon, 10 Mar 2014 01:02:19 GMT

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)

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:

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,

View raw message