You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rana Aich <ai...@gmail.com> on 2010/07/29 03:16:15 UTC

Consequences of Cassandra key NOT unique

Hello,

I was wondering what may the pitfalls in Cassandra when the Key value is not
UNIQUE?

Will it affect the range query performance?

Thanks and regards,

raich

Re: Consequences of Cassandra key NOT unique

Posted by Benjamin Black <b...@b3k.us>.
You are both confusing columns with rows.  Columns have timestamps,
row keys do not.

On Wed, Jul 28, 2010 at 11:37 PM, Thorvaldsson Justus
<ju...@svenskaspel.se> wrote:
> You insert 500 rows with key “x”
>
> And 1000 rows with key “y”
>
> You make a query getting all rows.
>
> It will only show two rows, the ones with the latest timestamps.
>
> /Justus
>
>
>
> Från: Rana Aich [mailto:aichrana@gmail.com]
> Skickat: den 29 juli 2010 08:23
> Till: user@cassandra.apache.org
> Ämne: Re: Consequences of Cassandra key NOT unique
>
>
>
> Thanks for your reply! I thought in that case a new row would be inserted
> with a new timestamp and cassandra will report the new row. But how this
> will affect my range query?
>
> It would not affect it.
>
>
>
> On Wed, Jul 28, 2010 at 7:03 PM, Benjamin Black <b...@b3k.us> wrote:
>
> If you write new data with a key that is already present, the existing
> columns are overwritten or new columns are added.  There is no way to
> cause a duplicate key to be inserted.
>
> On Wed, Jul 28, 2010 at 6:16 PM, Rana Aich <ai...@gmail.com> wrote:
>> Hello,
>> I was wondering what may the pitfalls in Cassandra when the Key value is
>> not
>> UNIQUE?
>> Will it affect the range query performance?
>> Thanks and regards,
>> raich
>>
>>
>
>

SV: Consequences of Cassandra key NOT unique

Posted by Thorvaldsson Justus <ju...@svenskaspel.se>.
You insert 500 rows with key "x"
And 1000 rows with key "y"
You make a query getting all rows.
It will only show two rows, the ones with the latest timestamps.
/Justus

Från: Rana Aich [mailto:aichrana@gmail.com]
Skickat: den 29 juli 2010 08:23
Till: user@cassandra.apache.org
Ämne: Re: Consequences of Cassandra key NOT unique

Thanks for your reply! I thought in that case a new row would be inserted with a new timestamp and cassandra will report the new row. But how this will affect my range query?
It would not affect it.

On Wed, Jul 28, 2010 at 7:03 PM, Benjamin Black <b@...@b3k.us>> wrote:
If you write new data with a key that is already present, the existing
columns are overwritten or new columns are added.  There is no way to
cause a duplicate key to be inserted.

On Wed, Jul 28, 2010 at 6:16 PM, Rana Aich <ai...@gmail.com>> wrote:
> Hello,
> I was wondering what may the pitfalls in Cassandra when the Key value is not
> UNIQUE?
> Will it affect the range query performance?
> Thanks and regards,
> raich
>
>


Re: Consequences of Cassandra key NOT unique

Posted by Rana Aich <ai...@gmail.com>.
Thanks for your reply! I thought in that case a new row would be inserted
with a new timestamp and cassandra will report the new row. But how this
will affect my range query?

On Wed, Jul 28, 2010 at 7:03 PM, Benjamin Black <b...@b3k.us> wrote:

> If you write new data with a key that is already present, the existing
> columns are overwritten or new columns are added.  There is no way to
> cause a duplicate key to be inserted.
>
> On Wed, Jul 28, 2010 at 6:16 PM, Rana Aich <ai...@gmail.com> wrote:
> > Hello,
> > I was wondering what may the pitfalls in Cassandra when the Key value is
> not
> > UNIQUE?
> > Will it affect the range query performance?
> > Thanks and regards,
> > raich
> >
> >
>

Re: Consequences of Cassandra key NOT unique

Posted by Benjamin Black <b...@b3k.us>.
If you write new data with a key that is already present, the existing
columns are overwritten or new columns are added.  There is no way to
cause a duplicate key to be inserted.

On Wed, Jul 28, 2010 at 6:16 PM, Rana Aich <ai...@gmail.com> wrote:
> Hello,
> I was wondering what may the pitfalls in Cassandra when the Key value is not
> UNIQUE?
> Will it affect the range query performance?
> Thanks and regards,
> raich
>
>