incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan, Brent" <BR...@cvent.com>
Subject Re: timeuuid and cql3 query
Date Wed, 19 Jun 2013 16:11:53 GMT
I'm using the byte ordered partitioner.

Sent from my iPhone

On Jun 19, 2013, at 11:26 AM, "Sylvain Lebresne" <sylvain@datastax.com<mailto:sylvain@datastax.com>>
wrote:

You're using the ordered partitioner, right?


On Wed, Jun 19, 2013 at 5:06 PM, Davide Anastasia <davide.anastasia@gmail.com<mailto:davide.anastasia@gmail.com>>
wrote:

Hi Tyler,
I am interested in this scenario as well: could you please elaborate further your answer?

Thanks a lot,
Davide

On 19 Jun 2013 16:01, "Tyler Hobbs" <tyler@datastax.com<mailto:tyler@datastax.com>>
wrote:

On Wed, Jun 19, 2013 at 8:08 AM, Ryan, Brent <BRyan@cvent.com<mailto:BRyan@cvent.com>>
wrote:

CREATE TABLE count3 (
  counter text,
  ts timeuuid,
  key1 text,
  value int,
  PRIMARY KEY ((counter, ts))
)

Instead of doing a composite partition key, remove a set of parens and let ts be your clustering
key.  That will cause cql rows to be stored in sorted order by the ts column (for a given
value of "counter") and allow you to do the kind of query you're looking for.


--
Tyler Hobbs
DataStax<http://datastax.com/>


Mime
View raw message