Nov 2016 20:47:05 -0500*Diamond ben
>>> <diamond@outlook.com <diamond@outlook.com>>* wrote
>>>
>>> The solution maybe work. However, the play list will grow over time and
>>> somebody maybe has ten thousands that will slow down the que
olution maybe work. However, the play list will grow over time and
>> somebody maybe has ten thousands that will slow down the query and sort .
>> Do you mean the oldest one should be removed when a new play is added?
>>
>> BTW, the version is 2.1.16 in our live system.
ion maybe work. However, the play list will grow over time and
>>> somebody maybe has ten thousands that will slow down the query and sort .
>>> Do you mean the oldest one should be removed when a new play is added?
>>>
>>> BTW, the version is 2.1.16 in our live system.
>&
amond@outlook.com <diamond@outlook.com>>* wrote
>>>
>>> The solution maybe work. However, the play list will grow over time and
>>> somebody maybe has ten thousands that will slow down the query and sort .
>>> Do you mean the oldest one sho
ody maybe has ten thousands that will slow down the query and sort .
>> Do you mean the oldest one should be removed when a new play is added?
>>
>> BTW, the version is 2.1.16 in our live system.
>>
>>
>> BRs,
>>
>> BEN
>> -
gt; BEN
> --
>
> *发件人:* Vladimir Yudovin <vla...@winguzone.com>
> *发送时间:* 2016年11月9日 18:11:26
> *收件人:* user
> *主题:* Re: 答复: A difficult data model with C*
>
> You are welcome! )
>
> >recent ten movies watched by the user within 30
he version is 2.1.16 in our live system.
BRs,
BEN
发件人: Vladimir Yudovin vla...@winguzone.com
发送时间: 2016年11月9日 18:11:26
收件人: user
主题: Re: 答复: A difficult data model with C*
You are welcome! )
recent ten movies watched by the user within 30 days.
In this case you can't use P
发件人: Vladimir Yudovin <vla...@winguzone.com>
发送时间: 2016年11月9日 18:11:26
收件人: user
主题: Re: 答复: A difficult data model with C*
You are welcome! )
>recent ten movies watched by the user within 30 days.
In this case you can't use PRIMARY KEY (user_name, video_id), as
发送时间: 2016年11月8日 22:35:48
收件人: user
主题: Re: A difficult data model with C*
Hi Ben,
if need very limited number of positions (as you said ten) may be you can store
them in LIST of UDT? Or just as JSON string?
So you'll have one row per each pair user-video.
It can be something like
and continue to watch from the
last position she/he did. BTW, a movie can be watched several times by a user
and the last positon is needed indeed.
BRs,
BEN
发件人: Vladimir Yudovin <vla...@winguzone.com>
发送时间: 2016年11月8日 22:35:48
收件人: user
主题: Re: A difficul
Hi Ben,
if need very limited number of positions (as you said ten) may be you can store
them in LIST of UDT? Or just as JSON string?
So you'll have one row per each pair user-video.
It can be something like this:
CREATE TYPE play (position int, last_time timestamp);
CREATE TABLE
Which version of Cassandra are you using? If this is a 3.0 or higher, why
don't you create a materialized view for ypur base table with the last time
as the first clustering colum?
However : It need to be confirmed if this is not an anti-pattern for
cassandra as this materialized view will have a
Agree, change the last_time to be descending order will help, you can also
TTL the data, so that the old records will be purged by Cassandra.
--Dikang.
On Mon, Nov 7, 2016 at 10:39 PM, Alain Rastoul
wrote:
> On 11/08/2016 03:54 AM, ben ben wrote:
>
>> Hi guys,
>>
On 11/08/2016 03:54 AM, ben ben wrote:
Hi guys,
CREATE TABLE recent (
user_name text,
vedio_id text,
position int,
last_time timestamp,
PRIMARY KEY (user_name, vedio_id)
)
Hi Ben,
May be a clustering columns order would help
CREATE TABLE recent (
...
) WITH
Hi guys,
We are maintaining a system for an on-line video service. ALL users' viewing
records of every movie are stored in C*. So she/he can continue to enjoy the
movie from the last point next time. The table is designed as below:
CREATE TABLE recent (
user_name text,
vedio_id
15 matches
Mail list logo