Hi Bobbie,
as Kenneth already mentioned, you should model your schema based on what
queries you are expecting to do and read related literature. From what I
see your table is named "customer_sensor_tagids" so its quite possible you
would have tagids as a part of primary key? Something like:
that in the
query?
If you could have tagid not be a collection, and make it part of the primary
key, that would help a lot.
From: Kenneth Brotman [mailto:kenbrot...@yahoo.com.INVALID]
Sent: Tuesday, March 05, 2019 4:33 PM
To: user@cassandra.apache.org
Subject: RE: data modelling
Hi Bobbie
Hi Bobbie,
You’re not giving enough information to model the data. With Cassandra it’s
based on the queries you are going to need. This link to Jeffrey Carpenter’s
book, Cassandra the Definitive Guide, Chapter 5, which is on how to do data
modeling for Cassandra, should be of help to you:
Hi Hannu,
Thank you for the pointer. We ended up using materialized views in
cassandra 3.0.3. Seems to do the trick :)
tor. 17. mar. 2016 kl. 11.16 skrev Hannu Kröger :
> Hi,
>
> That’s how I have done it in many occasions. Nowadays there is the
> possibility use Cassandra
Hi,
That’s how I have done it in many occasions. Nowadays there is the possibility
use Cassandra 3.0 and materialised views so that you don’t need to keep two
tables up to date manually:
http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views
This article explains when it's OK to use secondary indexes in Cassandra:
http://www.wentnet.com/blog/?p=77
PS: the article is from 2013, so it can be outdated by now.. but at least
it should give you some preliminary background on the topic.
2015-04-29 16:44 GMT-03:00 Robert Coli
Secondary indicies are inefficient and are deprecated, as far as I know.
Unless you store many thousands of emails for a long time (which I recommend
against), just use a single table with the partition key being the userid and
the timestamp being the clustering (column) key, as in your schema.
On Wed, Apr 29, 2015 at 9:01 AM, Donald Smith
donald.sm...@audiencescience.com wrote:
Secondary indicies are inefficient and are deprecated, as far as I know.
They are not deprecated, the correct summary is that they should only be
used in very particular circumstances. If you're not sure if
create table messages(
body text,
username text,
tags settext
PRIMARY keys(username,tags)
)
This statement is syntactically invalid, also you cannot use a collection type
in the primary key.
1) I should be able to query by username and get all the messages for a
Is it good practice then to find an attribute in my data that would allow me
to form wide row row keys with aprox. 1000 values each?
You can do that using get_range_slice() via thrift.
And via CQL 3 you use the token() function and Limit with a select statement.
Check the DS docs for more
@cassandra.apache.orgmailto:user@cassandra.apache.org
user@cassandra.apache.orgmailto:user@cassandra.apache.org
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Data Modelling Suggestions
I was trying to find hector
I was trying to find hector examples where we search for second column in a
composite column, but I couldn't find any good one. Im not sure if its
possible.…if you have any do have any example please share.
It's not. When slicing columns you can only return one contiguous range.
Anyway I
-To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
user@cassandra.apache.orgmailto:user@cassandra.apache.org
To: user@cassandra.apache.orgmailto:user@cassandra.apache.org
user@cassandra.apache.orgmailto:user@cassandra.apache.org
Subject: Re: Data Modelling Suggestions
I was trying
I think you need another CF as index.
user_itemid - timestamped column_name
Otherwise you can't guess what's the timestamp to use in the column name.
Anyway I would prefer storing the item-ids as column names in the main
column family and having a second CF for the order-by-date query only with
On Mon, Jun 14, 2010 at 6:09 AM, Per Olesen p...@trifork.com wrote:
So, in my use case, when searching on e.g. company, I can then access the
DashboardCompanyIndex with a slice on its SC and then grab all the uuids
from the columns, and after this, make a lookup in the Dashboard CF for each
On Jun 14, 2010, at 6:29 PM, Benjamin Black wrote:
On Mon, Jun 14, 2010 at 6:09 AM, Per Olesen p...@trifork.com wrote:
So, in my use case, when searching on e.g. company, I can then access the
DashboardCompanyIndex with a slice on its SC and then grab all the uuids
from the columns, and
16 matches
Mail list logo