""Get me the count of orders changed in a given sequence-id range"" --> Can
you give an example of SELECT statement for this query ?

Because given the table structure, you have to provide the shard-and-date
partition key and I don't see how you can know this value unless you create
as many SELECT as there are Cassandra nodes, for a given date ...

On Thu, Nov 5, 2015 at 4:21 PM, Sachin Nikam <skni...@gmail.com> wrote:

> I currently have a keyspace with table definition that looks like this.
>
>
> CREATE TABLE *orders*(
>   order-id long PRIMARY KEY,
>   order-blob text
> );
>
> This table will have a write load of ~40-100 tps and a read load of ~200-400 
> tps.
>
> We are now considering adding another table definition which closely 
> resembles a timeseries table.
>
> CREATE TABLE order_sequence(
> //shard-id will be generated by order-id%Number of Nodes in //Cassandra Ring. 
> It will be then suffixed with Current //Date. An Example would be 
> 2-Nov-11-2015
>
>   shard-and-date text,
>
> //This will be a simple flake generated long
>   sequence-id long
>   PRIMARY KEY (shard-and-date, sequence-id)
> )WITH CLUSTERING ORDER BY (sequence-id DESC);
>
>
> The goal of this table is to answer queries like "Get me the count of orders 
> changed in a given sequence-id range". This query will be called once every 5 
> sec.
>
> The plan is to write both these tables in a single BATCH statement.
>
> 1. Will this impact the WRite latency?
>
> 2. Also will it impact Read latency of "orders" table?
>
> 3. Will it impact the overall stability of the cluster?
>
>

Reply via email to