From user-return-35535-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Wed Jul 24 05:35:27 2013 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 114CA104E3 for ; Wed, 24 Jul 2013 05:35:27 +0000 (UTC) Received: (qmail 85221 invoked by uid 500); 24 Jul 2013 05:35:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 85013 invoked by uid 500); 24 Jul 2013 05:35:24 -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 85005 invoked by uid 99); 24 Jul 2013 05:35:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 05:35:23 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of blake@grapheffect.com does not designate 209.85.160.52 as permitted sender) Received: from [209.85.160.52] (HELO mail-pb0-f52.google.com) (209.85.160.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jul 2013 05:35:17 +0000 Received: by mail-pb0-f52.google.com with SMTP id xa12so9233730pbc.25 for ; Tue, 23 Jul 2013 22:34:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer:x-gm-message-state; bh=qGVB+BCG+/wNrKm1iLw4CZG+vMhFML5Mm7ZX2apk4wk=; b=RKNPJqvOa3DIdJRWdtljdCetwnyWRZq5zF6fDW5KDcJWEJV+x00q9w/a2lS+ibY4lb o3jNuBt/BUqGVgpX9Zc139j3pCpldzr2w4SvGkkjWsOM6EhThFvlla9Xnlpsno9qGKQz IAFk8U2IDZPTSPS+0yF8Qz0ao7TbnM53cY+ItIE2UPDdQiISglP2vYogUdHdMQSZUBYG T9MHlTYixOYnmYJwKa+IeBZJ5GR+XhsLQCRowaeSmmsIpMOKAl/nkldklv4FiXrlyE0o WcLRIs0My3Fg3rhCTuh2G5tMOx4CNu1QM6meJaFJLME7CUk0+jGUTw37VAJkPzt8TDwP 9sUQ== X-Received: by 10.68.243.65 with SMTP id ww1mr41030531pbc.62.1374644094284; Tue, 23 Jul 2013 22:34:54 -0700 (PDT) Received: from [192.168.1.2] (cpe-108-184-244-190.socal.res.rr.com. [108.184.244.190]) by mx.google.com with ESMTPSA id xe9sm45590301pbc.21.2013.07.23.22.34.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 23 Jul 2013 22:34:53 -0700 (PDT) From: Blake Eggleston Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_3AC9C059-4729-43C4-823C-FA6C9BFFE5DE" Subject: Re: get all row keys of a table using CQL3 Date: Tue, 23 Jul 2013 22:34:48 -0700 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <03412FD1-BA18-467E-A0F8-35180F290487@grapheffect.com> X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQmhNp06Wibwz7pAVKbGfSqjoHJHIWHcPhKIsyJJRE2g6JUnuEv85Sh0se2xAcNsHp9M7OLb X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_3AC9C059-4729-43C4-823C-FA6C9BFFE5DE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hi Jimmy, Check out the token function: = http://www.datastax.com/docs/1.1/dml/using_cql#paging-through-non-ordered-= partitioner-results You can use it to page through your rows. Blake On Jul 23, 2013, at 10:18 PM, Jimmy Lin wrote: > hi, > I want to fetch all the row keys of a table using CQL3: > =20 > e.g > select id from mytable limit 9999999 > =20 > =20 > #1 > For this query, does the node need to wait for all rows return from = all other nodes before returning the data to the client(I am using = astyanax) ? > In other words, will this operation create a lot of load to the = initial node receiving the request? > =20 > =20 > #2 > if my table is big, I have to make sure the limit is set to a big = enough number, such that I can get all the result. Seems like I have to = do a count(*) to be sure.... > is there any alternative(always return all the rows)? > =20 > #3 > if my id is a timeuuid, is it better to combine the result from = couple of the following cql to obtain all keys? > e.g > select id from mytable where id t < minTimeuuid('2013-02-02 = 10:00+0000') limit 20000 > + > select id from mytable where id t > maxTimeuuid('2013-02-02 = 10:00+0000') limit 20000 > =20 > thanks >=20 > =20 > =20 > =20 --Apple-Mail=_3AC9C059-4729-43C4-823C-FA6C9BFFE5DE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Hi = Jimmy,

Check out the token = function:


<= div>You can use it to page through your = rows.

Blake


On Jul 23, 2013, at 10:18 PM, Jimmy Lin wrote:

hi,
I want to fetch all the row keys of a = table using CQL3:
 
e.g
select id = from mytable limit = 9999999
 
 
#1
For = this query, does the node need to wait for all rows return from all = other nodes before returning the data to the client(I am using astyanax) = ?
In other words, will this operation create a lot of load to the = initial node receiving the = request?
 
 
#2
if my = table is big, I have to make sure the limit is set to a big enough = number, such that I can get all the result. Seems like I have to do a = count(*) to be sure....
is there any alternative(always return all the = rows)?
 
#3
if my id is a timeuuid, = is it better to  combine the result from couple of the = following cql to obtain all keys?
e.g
select id from mytable where id t < = minTimeuuid('2013-02-02 10:00+0000') = limit 20000
+
select id = from mytable where id t > = maxTimeuuid('2013-02-02 10:00+0000') = limit 20000
=
 
thanks

 
 
 

= --Apple-Mail=_3AC9C059-4729-43C4-823C-FA6C9BFFE5DE--