Hi Denis,

You might want to have a look at

- Materialized views
http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views
- Secondary index
https://docs.datastax.com/en/cql/3.3/cql/cql_using/useWhenIndex.html

My 2 cents: make sure to understand the implications before moving forward,
what is happening under the hood or at least that your use case fits with
the recommendations. Indexes and views are not free. If you want to know
more, you might want to watch this:
https://www.youtube.com/watch?v=dxiuQ2CkXfM from DuyHai at the summit this
year :-).

C*heers,
-----------------------
Alain Rodriguez - @arodream - al...@thelastpickle.com
France

The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com

2016-09-23 10:42 GMT+02:00 Denis Mikhaylov <notxc...@gmail.com>:

> Hi!
>
> I have question regarding data modelling.
>
> Let’s say that I have `subscriptions` table with two columns
> `subscription_id text` and `next_billing_date timestamp`.
>
> How do I model a table to efficiently query all subscriptions due today
> (something like `where next_billing_date <= today`)

Reply via email to