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 F35CF108E3 for ; Fri, 25 Jul 2014 18:40:37 +0000 (UTC) Received: (qmail 71765 invoked by uid 500); 25 Jul 2014 18:40:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 71724 invoked by uid 500); 25 Jul 2014 18:40:35 -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 71713 invoked by uid 99); 25 Jul 2014 18:40:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 18:40:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_IMAGE_ONLY_32,HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of graham@vast.com designates 209.85.219.41 as permitted sender) Received: from [209.85.219.41] (HELO mail-oa0-f41.google.com) (209.85.219.41) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2014 18:40:32 +0000 Received: by mail-oa0-f41.google.com with SMTP id j17so6007076oag.14 for ; Fri, 25 Jul 2014 11:40:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:references:from:content-type:in-reply-to :message-id:date:to:content-transfer-encoding:mime-version; bh=TT0GuK8aFRsK8QFevOoRh2enHRu50vCtmdxooZbe+mw=; b=A51Nww73F0Esrj2Wj5cDNGcBljPlws3fqAtRWdozlErFw3L42vzZsU5n9/gM5hFexg AG4sThEsfN4eHRelaKiW2gyVKRTO5Nz09xs2NxbxeKFLsDawgSFLUbgeUs27dDmRG+KH ekQCgEW8mOnRaVrpSutcSOXOMG+nucvgEymVGzqZWYhNjmk/c5fCCaWwheAlYeGQXVsw pt9KyFwUMc8STwJWohnmf+y2EzknVv6pHfRdKDiCHkSxADaae2ln4rU1/pnHAHD1jGsW j2X2OMLaU2T/s4DFpQltat9Q2vMWOjuGVVaFzElmKb00kylA3+uVXD1I/k2IJ5mFlSea Etdw== X-Gm-Message-State: ALoCoQk1UjdP0z2m4l+oR+vvR2XY0EhR2zRUEzYhA7r0aTGEXyovYq3kWpNgUCCv/+GQVIRd6zLE X-Received: by 10.60.159.232 with SMTP id xf8mr25532702oeb.16.1406313607234; Fri, 25 Jul 2014 11:40:07 -0700 (PDT) Received: from [10.237.155.114] ([107.107.190.175]) by mx.google.com with ESMTPSA id x10sm20600923obg.24.2014.07.25.11.40.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 11:40:06 -0700 (PDT) Subject: =?utf-8?Q?Re:_Does_SELECT_=E2=80=A6_IN_=28=29_use_parallel_dispatch=3F?= References: From: Graham Sanderson Content-Type: multipart/alternative; boundary=Apple-Mail-2FD07EA8-C417-48BB-A556-D071DF230D4D X-Mailer: iPhone Mail (11D257) In-Reply-To: Message-Id: <005D6653-0F50-496B-9022-E63947E114F1@vast.com> Date: Fri, 25 Jul 2014 13:40:06 -0500 To: "user@cassandra.apache.org" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-2FD07EA8-C417-48BB-A556-D071DF230D4D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Of course the driver in question is allowed to be smarter and can do so if u= se use a ? parameter for a list or even individual elements I'm not sure which if any drivers currently do this but we plan to combine t= his with token aware routing in our scala driver in the future=20 Sent from my iPhone > On Jul 25, 2014, at 1:14 PM, DuyHai Doan wrote: >=20 > Nope. Select ... IN() sends one request to a coordinator. This coordinator= dispatch the request to 50 nodes as in your example and waits for 50 respon= ses before sending back the final result. As you can guess this approach is n= ot optimal since the global request latency is bound to the slowest latency a= mong 50 nodes. >=20 > On the other hand if you use async feature from the native protocol, you c= lient will issue 50 requests in parallel and the answers arrive as soon as t= hey are fetched from different nodes. >=20 > Clearly the only advantage of using IN() clause is ease of query. I would= advise to use IN() only when you have a "few" values, not 50. >=20 >=20 >> On Fri, Jul 25, 2014 at 8:08 PM, Kevin Burton wrote:= >> Say I have about 50 primary keys I need to fetch. >>=20 >> I'd like to use parallel dispatch. So that if I have 50 hosts, and each h= as record, I can read from all 50 at once. >>=20 >> I assume cassandra does the right thing here ? I believe it does=E2=80=A6= at least from reading the docs but it's still a bit unclear. >>=20 >> Kevin >>=20 >> --=20 >> Founder/CEO Spinn3r.com >> Location: San Francisco, CA >> blog: http://burtonator.wordpress.com >> =E2=80=A6 or check out my Google+ profile >>=20 >=20 --Apple-Mail-2FD07EA8-C417-48BB-A556-D071DF230D4D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Of course the driver in question is al= lowed to be smarter and can do so if use use a ? parameter for a list or eve= n individual elements

I'm not sure which if any dri= vers currently do this but we plan to combine this with token aware routing i= n our scala driver in the future 

Sent from my iPhone
=
On Jul 25, 2014, at 1:14 PM, DuyHai Doan <doanduyhai@gmail.com> wrote:

Nope. Select ... IN() sends one request to= a coordinator. This coordinator dispatch the request to 50 nodes as in your= example and waits for 50 responses before sending back the final result. As= you can guess this approach is not optimal since the global request latency= is bound to the slowest latency among 50 nodes.

 On the other hand if you use async feature from the nat= ive protocol, you client will issue 50 requests in parallel and the answers a= rrive as soon as they are fetched from different nodes.

=
 Clearly the only advantage of using IN() clause is ease of query.= I would advise to use IN() only when you have a "few" values, not 50.
=


On Fri, Jul 25, 2014 at 8:08 PM, Kevin Burton <burton@spinn3r.com> wrote:
Say I have about 50 primary keys I need to fetch.

<= /div>
I'd like to use parallel dispatch.  So that if I have 50 host= s, and each has record, I can read from all 50 at once.

=
I assume cassandra does the right thing here ?  I believe it does=E2= =80=A6 at least from reading the docs but it's still a bit unclear.

Kevin

--

= --Apple-Mail-2FD07EA8-C417-48BB-A556-D071DF230D4D--