cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Morrison <...@aninteractive.com>
Subject Indexes on Columns & SubColumns Clarification
Date Thu, 04 Nov 2010 21:13:31 GMT
Hi,

I've been doing a lot of reading and I've one thing I'm not entirely
clear on - could someone clarify?

Q: Exactly at what point does indexing stop?

I'm trying to use cassandra to store log information that is both user
& time sensitive.

So I've a basic model like this:

detailed_log: { // supercolumnfamily (?)
	username : { // supercolum (?)
		uuid { price : 100, min	: 10, max : 500 }, // columns
		uuid { price : 100, min	: 10, max : 500 },
		uuid { price : 100, min	: 10, max : 500 },

                // ... expect 25,440 of these per username, per year
	}
}

Defined as:

<ColumnFamily Name="pricelog" ColumnType="Super"
CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType"/>


I've read

http://wiki.apache.org/cassandra/CassandraLimitations and
http://wiki.apache.org/cassandra/DataModelv2#ColumnFamily_containing_SuperColumns

... and lots else I could find on t'interweb but I'm still unclear if
this is the right way to go about it!?


My query model, in pseudosql is:  (( where * is [price, min, max] etc ))

SELECT * FROM detailed_log WHERE username = 'foobar' AND uuid RANGE(
start_UUID -> end_UUID );


So, the question is, can I store my data like this, and retrieve it
efficiently, or do I need to combine my keys?

Hope I'm not being dense or asking an faq - I couldn't find a clear
answer anywhere.

Thanks!

Jim

Mime
View raw message