You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Tony Anecito <ad...@yahoo.com> on 2013/06/25 17:02:38 UTC
Is nexted selects supported by Cassandra JDBC??
Hi All,
Is nested select supported by Cassandra JDBC driver?
So for a simple example to get a list of user details from a users column family:
Select * from user_details where user_id in (Select user_id from users)
Thanks!
-Tony
Re: Is nexted selects supported by Cassandra JDBC??
Posted by Job M Thomas <jo...@yahoo.com>.
Please read the below blog
Cassandra : Sub-Query Implementation
http://cassandrapowerfulnosql.blogspot.in/2015/03/sub-query-in-
cassandra.html
Re: Is nexted selects supported by Cassandra JDBC??
Posted by Sylvain Lebresne <sy...@datastax.com>.
Yes, denormalization is usually the answer to the absence of sub-queries
(and joins for that matter) in Cassandra (though sometimes, simply doing 2
queries is fine, depends on your use case and performance requirements).
On Tue, Jun 25, 2013 at 6:46 PM, Tony Anecito <ad...@yahoo.com> wrote:
> Ok. So if I have a composite key table instead of a nested select I will
> have to run 2 queries else denormalize? Unless there is something provided
> by CQL 3 to do the same thing?
>
> Thanks,
> -Tony
>
>
> ------------------------------
> *From:* Sylvain Lebresne <sy...@datastax.com>
> *To:* "user@cassandra.apache.org" <us...@cassandra.apache.org>; Tony
> Anecito <ad...@yahoo.com>
> *Sent:* Tuesday, June 25, 2013 9:06 AM
> *Subject:* Re: Is nexted selects supported by Cassandra JDBC??
>
> No. CQL3 doesn't support nested selects.
>
> --
> Sylvain
>
>
> On Tue, Jun 25, 2013 at 5:02 PM, Tony Anecito <ad...@yahoo.com> wrote:
>
> Hi All,
>
> Is nested select supported by Cassandra JDBC driver?
>
> So for a simple example to get a list of user details from a users column
> family:
>
> Select * from user_details where user_id in (Select user_id from users)
>
> Thanks!
> -Tony
>
>
>
>
>
Re: Is nexted selects supported by Cassandra JDBC??
Posted by Tony Anecito <ad...@yahoo.com>.
Ok. So if I have a composite key table instead of a nested select I will have to run 2 queries else denormalize? Unless there is something provided by CQL 3 to do the same thing?
Thanks,
-Tony
________________________________
From: Sylvain Lebresne <sy...@datastax.com>
To: "user@cassandra.apache.org" <us...@cassandra.apache.org>; Tony Anecito <ad...@yahoo.com>
Sent: Tuesday, June 25, 2013 9:06 AM
Subject: Re: Is nexted selects supported by Cassandra JDBC??
No. CQL3 doesn't support nested selects.
--
Sylvain
On Tue, Jun 25, 2013 at 5:02 PM, Tony Anecito <ad...@yahoo.com> wrote:
Hi All,
>
>
>Is nested select supported by Cassandra JDBC driver?
>
>
>So for a simple example to get a list of user details from a users column family:
>
>
>Select * from user_details where user_id in (Select user_id from users)
>
>
>Thanks!-Tony
Re: Is nexted selects supported by Cassandra JDBC??
Posted by Sylvain Lebresne <sy...@datastax.com>.
No. CQL3 doesn't support nested selects.
--
Sylvain
On Tue, Jun 25, 2013 at 5:02 PM, Tony Anecito <ad...@yahoo.com> wrote:
> Hi All,
>
> Is nested select supported by Cassandra JDBC driver?
>
> So for a simple example to get a list of user details from a users column
> family:
>
> Select * from user_details where user_id in (Select user_id from users)
>
> Thanks!
> -Tony
>