From user-return-35106-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Mon Jul 8 13:24:51 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 4ABA310720 for ; Mon, 8 Jul 2013 13:24:51 +0000 (UTC) Received: (qmail 23188 invoked by uid 500); 8 Jul 2013 13:24:48 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 23128 invoked by uid 500); 8 Jul 2013 13:24:48 -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 23104 invoked by uid 99); 8 Jul 2013 13:24:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 13:24:47 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.138.91.38] (HELO nm14-vm1.bullet.mail.ne1.yahoo.com) (98.138.91.38) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jul 2013 13:24:40 +0000 Received: from [98.138.90.48] by nm14.bullet.mail.ne1.yahoo.com with NNFMP; 08 Jul 2013 13:24:18 -0000 Received: from [98.138.101.165] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 08 Jul 2013 13:24:18 -0000 Received: from [127.0.0.1] by omp1076.mail.ne1.yahoo.com with NNFMP; 08 Jul 2013 13:24:18 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 409763.55292.bm@omp1076.mail.ne1.yahoo.com Received: (qmail 53443 invoked by uid 60001); 8 Jul 2013 13:24:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1373289858; bh=qh2jpWaLbyyPmyMSaAmAGaEfIsMSL+57OgVSUSFdKs4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=PA4boQqPtScIj3nEw9GTHkVjIfU3iTr0AN0Y5OVL30e/hDQeSP+RuqQmqtiRC4kJIlMd0WrdVo8PgpxPrpzBwlmE0boXiGbWSXh0J77o3S3V8HE8pH1diGvfxukjasOw4w1XGa2WS9vgBcIJaeZ0BZOQ7FEvPWxul7erGN5CKcs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=jiNgwZK67Zuu+hxDmvgypakTMtWJEtjtVtxjT9uvlSKE/97IC6jD4KHS51vKJAh6TIAbsDMDjV8AF784jUSG5BxNBzIzRfaFVKoUD257klV2uN0xA/jFd/H39Wf5Pubegj9zidp72G0iL1q92kZiVZGp60N3nRU0lhH+4TCNcuk= ; X-YMail-OSG: yNna5JcVM1kpIbsJdZoTL0hPhje6l1sWcXGIEfmjIdOeKun fFGRslvLG5VxUKFBs84hctWIC8.pvYbnqoWU2HxzmDG5t6CpURN.iSce76kP izlx0L_9LP4qJFol8ChwpfptcT.0PDb6GMpPYk7JXNUGRQ5sH3pNKOppj8uB tQJctkzcHOyaWXIExizpIYHwbE9USD5QxxV0MqzWiBgxLiYRQ7joA1ukhIY6 YegbK03AOq8h_CxCAjgcmngMUsIPuovBNIpAHJijV7IsNpOYmIH7p_xyph_A K.XGnz5rN_huKhfNnRZ0WAjdHVvk1i_bhTSMQu.CDJ4iOTly5nPSixJgFzVw u7oNIfFvIgvNEnBHN7xYybh6P80ux8jYOrDH9AeJFoeYU3yjzwH6o9oQLIhb REnUH1eiuBAQf_eVvm6KcrDYfRKzbjGcgH13_JL4uIdR.iN8_P5nCDG5Bm_M FRN7CePl_Pb03Gz3mrVqAtj6PbfJjHc8aOQriK7DZX8S8khXmv0WIdOluxQf e1qOVW_0m9O5mzpUfg24zy1gg1Tu3t8kpaJi75UV9DBYaEufBeyfU4nGc6ue XkntBuPPhxMJsbWKJw4xS1Aghq4o.Py7ww4HBGY.u9CRWE7fSRL_wp2XRpdy BIpJ53Q6LPNKW1DX9yKFz7RHLdeHPsjbn8o2xUDWYDCkuMEF77Tx1mGz5F3C zlJkpN0QXMj.gLsTEG8yWaH4cNlBICpLt6tbOnQ-- Received: from [204.228.207.218] by web121803.mail.ne1.yahoo.com via HTTP; Mon, 08 Jul 2013 06:24:18 PDT X-Rocket-MIMEInfo: 002.001,VGhhbmtzIFBldHJvdiBJIHdpbGwgcmVhZCB3aGF0IHlvdSBzZW50IGEgbGluayB0by4gSSBhbSB0cnlpbmcgdG8gZmluZCBvdXQgd2hhdCBjYXBhYmlsaXR5IENRTCB3aXNlIGlzIHRydWVseSBhdmFpbGFibGUgaW4gb3JkZXIgdG8gZGV0ZXJtaW5lIG15IGVuZCBzdGF0ZSBmb3IgbXkgZGF0YSBtb2RlbC4KwqAKTGFzdCBuaWdodCBhZnRlciBJIGRpc2NvdmVyZWQgdGhlIGNhc2hpbmcgaXNzdWVzIHRoYXQgYWZmZWN0ZWQgcXVlcmllcyBJIHdhcyBhYmxlIHRvIGNyZWF0ZSB0d28gcXVlcmllcyBvbmUgdG8gZ2UBMAEBAQE- X-Mailer: YahooMailWebService/0.8.148.557 References: <1372974827.10182.YahooMailNeo@web121802.mail.ne1.yahoo.com> Message-ID: <1373289858.51507.YahooMailNeo@web121803.mail.ne1.yahoo.com> Date: Mon, 8 Jul 2013 06:24:18 -0700 (PDT) From: Tony Anecito Reply-To: Tony Anecito Subject: Re: CQL and IN To: "user@cassandra.apache.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-877950688-599697425-1373289858=:51507" X-Virus-Checked: Checked by ClamAV on apache.org ---877950688-599697425-1373289858=:51507 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Petrov I will read what you sent a link to. I am trying to find out = what capability CQL wise is truely available in order to determine my end s= tate for my data model.=0A=A0=0ALast night after I discovered the cashing i= ssues that affected queries I was able to create two queries one to get a l= ist of ids then from that built up the IN list for the second query to get = detail data from a master column family. Prevously in SQL Server I would us= e one query using IN and nested select. Hopefully tonight I will be able to= compare the performance of the two.=0A=A0=0ARegards,=0A-Tony=0A=A0=0A=A0= =0A=0AFrom: Oleksandr Petrov =0ATo: user@cassan= dra.apache.org =0ASent: Monday, July 8, 2013 5:51 AM=0ASubject: Re: CQL and= IN=0A=0A=0A=0AHi Tony, you can check out a guide here:=A0http://clojurecas= sandra.info/articles/kv.html which explains pretty most of things you need = to know about queries for starters.=A0 =0A=0AIt includes CQL code examples,= just disregard Clojure ones, there's nothing strictly Clojure-driver speci= fic in that guide.=0A=0A=0A=0AOn Fri, Jul 5, 2013 at 12:18 AM, Rui Vieira <= ruidevieira@googlemail.com> wrote:=0A=0AYou can use the actual item_ids how= ever,=A0 =0A>=0A>=0A>Select * from items Where item_id IN (1, 2, 3, ..., n)= =0A>=0A>=0A>=0A>On 4 July 2013 23:16, Rui Vieira wrote:=0A>=0A>CQL does not support sub-queries.=0A>>=0A>>=0A>>=0A>>On 4 = July 2013 22:53, Tony Anecito wrote:=0A>>=0A>>Hi All,= =0A>>>=0A>>>I am using the DataStax driver and got prepared to work. When I= tried to use the "IN" keyword with a SQL it did not work. According to Dat= aStax IN should work.=0A>>>=0A>>>So if I tried:=0A>>>=0A>>>Select * from it= ems Where item_id IN (Select item_id FROM users where user_id =3D ?)=0A>>>= =0A>>>=0A>>>Thanks for the feedback.-Tony=0A>>=0A>=0A=0A=0A-- =0Aalex p ---877950688-599697425-1373289858=:51507 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Petrov I will read what you sent a= link to. I am trying to find out what capability CQL wise is truely availa= ble in order to determine my end state for my data model.
 
Last night after I discovered= the cashing issues that affected queries I was able to create two queries = one to get a list of ids then from that built up the IN list for the second= query to get detail data from a master column family. Prevously in SQL Ser= ver I would use one query using IN and nested select. Hopefully tonight I w= ill be able to compare the performance of the two.
 
Regards,
-Tony
 
 

From: Oleksandr Petrov <oleksandr.petr= ov@gmail.com>
To: use= r@cassandra.apache.org
Sent: Monday, July 8, 2013 5:51 AM
= Subject: Re: CQL and IN

Hi Tony, you can check out a guide her= e: http://clojurecassandra.info/articles/kv.html whi= ch explains pretty most of things you need to know about queries for starte= rs. 

It includes CQL code examples, just disregard Cl= ojure ones, there's nothing strictly Clojure-driver specific in that guide.=


On Fri, Jul 5, 2013 at 12:18 AM, Rui = Vieira <= ruidevieira@googlemail.com> wrote:
You can use the actual item_ids however, 

Select * from items Where item_id IN (= 1, 2, 3, ..., n)


On 4 July 2013 23:16, Rui Vieira <ruidevieira= @googlemail.com> wrote:
CQL does not support sub-queries.


On 4 July 2013 22:53, Tony Anecito <adanecito@yahoo.com= > wrote:
Hi All,
 
I am using the DataStax driver and got prepared to work. When I tried = to use the "IN" keyword with a SQL it did not work. According to DataStax I= N should work.
 
So if I tried:
 
Select * from items Where item_id IN (Select item_id FROM users where = user_id =3D ?)
 
 
Thanks for the feedback.
-Tony




--
alex p


---877950688-599697425-1373289858=:51507--