e base table as the MV
> PK. But still working fine.
>
>
> That is my first Cassandra use case and the guidance provided by you guys
> pretty important.
>
> Thanks very much for the answers, questions and suggestions.
>
>
> --
> IPVP
>
>
> From: DuyHai Doan
> R
assandra.apache.org
><mailto:user@cassandra.apache.org>
Date: January 12, 2016 at 10:27:45 AM
To: user@cassandra.apache.org
><mailto:user@cassandra.apache.org>
Cc: Jack Krupansky ><mailto:jack.krupan...@gmail.com>
Subject: Re: Modeling contact list, plain table or List
1)SELEC
ly with the select requirements?
>>
>> Thanks
>> --
>> IPVP
>>
>>
>> From: Jack Krupansky
>>
>> Reply: user@cassandra.apache.org >
>>
>> Date: January 11, 2016 at 7:00:04 PM
>>
>> To: user@cassandra.apache.org >
&
> Reply: user@cassandra.apache.org >
>
> Date: January 11, 2016 at 7:00:04 PM
>
> To: user@cassandra.apache.org >
>
> Subject: Re: Modeling contact list, plain table or List
>
> That's the beauty of MV - Cassandra automatically updates the MVs when the
> base table c
ate: January 11, 2016 at 7:00:04 PM
>
> To: user@cassandra.apache.org >
>
> Subject: Re: Modeling contact list, plain table or List
>
> That's the beauty of MV - Cassandra automatically updates the MVs when the
> base table changes, including deletions, which is why all
: user@cassandra.apache.org
><mailto:user@cassandra.apache.org>
Date: January 11, 2016 at 7:00:04 PM
To: user@cassandra.apache.org
><mailto:user@cassandra.apache.org>
Subject: Re: Modeling contact list, plain table or List
That's the beauty of MV - Cassandra automatically updates the MVs
rite IS NOT NULL AND contactname IS NOT
> NULL
> PRIMARY KEY ( ( userid, isfavorite ), contactname )
> WITH CLUSTERING ORDER BY ( contactname DESC )
>
> Thanks
>
> --
> IPVP
>
>
> From: DuyHai Doan
> Reply: user@cassandra.apache.org >
>
> Date: January
a.apache.org>
Subject: Re: Modeling contact list, plain table or List
In the current iteration of materialized view, it is still not possible to have
WHERE clause other than IS NOT NULL so is_favourite IS TRUE won't work.
Still there is a JIRA created to support this feature :
https://
gt;> by contact_name like this ? :
>>>>
>>>> CREATE TABLE communication.user_contact_list (
>>>> user_id uuid,
>>>> contact_name text,
>>>> is_favorite boolean,
>>>> contact_id uuid,
>>>> created_at timeuuid,
>>
R BY (contact_name ASC);
>>>
>>> Query: Select * from user_contact_list where user_id = :userid and
>>> is_favorite = true order by contact_name asc;
>>>
>>> Looks like each contact as a row/clustering key will be the way to go.
>>>
>>> Thanks
>>
re user_id = :userid and
>> is_favorite = true order by contact_name asc;
>>
>> Looks like each contact as a row/clustering key will be the way to go.
>>
>> Thanks
>>
>> IPVP
>>
>>
>> From: Laing, Michael
>>
>> Reply: user@cassandra.ap
rg >
>
> Date: January 9, 2016 at 11:51:27 AM
> To: user@cassandra.apache.org >
>
> Subject: Re: Modeling contact list, plain table or List
>
> Note that in C* 3.02 the second query is invalid:
>
> cqlsh> Select * from communication.user_contact_list where us
: Laing, Michael
<mailto:michael.la...@nytimes.com>
Reply: user@cassandra.apache.org
><mailto:user@cassandra.apache.org>
Date: January 9, 2016 at 11:51:27 AM
To: user@cassandra.apache.org
><mailto:user@cassandra.apache.org>
Subject: Re: Modeling contact list, plain table
Note that in C* 3.02 the second query is invalid:
cqlsh> Select * from communication.user_contact_list where user_id =
98f50f00-b6d5-11e5-afec-6003089bf572 and is_favorite = true order
by contact_name asc;
*InvalidRequest: code=2200 [Invalid query] message="PRIMARY KEY column
"is_favorite" cannot
How big is each contact list expected to be? Dozens? Hundreds? Thousands?
If just dozens, a simple list column would seem sufficient. If thousands,
the row (not partition) would get kind of bloated.
What requirements do you have for updating? If updating contacts and lots
of contacts, I think I'd
Hi everyone
What would perform better while modeling a simple user contact list that will
be used mainly to select the recipients for/from/to messages ?
a) Individual rows to each (user, contact) pair so a select would fetch all the
rows to retrieve all the contacts from a given user.
or
b)
16 matches
Mail list logo