You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Ricardo Sancho <sa...@gmail.com> on 2015/10/09 21:07:04 UTC

CLUSTERING ORDER BY importance with ssd's

If I have a table

CREATE TABLE status (
    user text,
    time timestamp,
    status text,
    PRIMARY KEY (user, time))
    WITH CLUSTERING ORDER BY (time ASC);

adapted from http://www.datastax.com/dev/blog/row-caching-in-cassandra-2-1

This means at the top of the partition the oldest date appears first.
If I am selecting a range from the bottom of the partition, does it make
much of a difference (considering I only use ssd's) if the clustering order
is ASC or DESC.
DESC would mean I would most of the time access the top of the partition.
Newest dates would be at the top.
While the current ASC means I access mostly the bottom.

Thanks.

Re: CLUSTERING ORDER BY importance with ssd's

Posted by Ricardo Sancho <sa...@gmail.com>.
this probably depends on the number of rows we have
but should one worry performance wise about this seek?
or from how many rows should we worry about this?

On 9 October 2015 at 21:26, Nate McCall <na...@thelastpickle.com> wrote:

>
>> If I am selecting a range from the bottom of the partition, does it make
>> much of a difference (considering I only use ssd's) if the clustering order
>> is ASC or DESC.
>>
>
> The only impact is that there is an extra seek to the bottom of the
> partition.
>
>
>
>
>

Re: CLUSTERING ORDER BY importance with ssd's

Posted by Nate McCall <na...@thelastpickle.com>.
>
>
> If I am selecting a range from the bottom of the partition, does it make
> much of a difference (considering I only use ssd's) if the clustering order
> is ASC or DESC.
>

The only impact is that there is an extra seek to the bottom of the
partition.