cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Kania (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-8509) Range queries/ORDER BY should be possible with a secondary index for a single row
Date Thu, 18 Dec 2014 01:50:13 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-8509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jason Kania updated CASSANDRA-8509:
-----------------------------------
    Description: 
For instances when time series data is being stored and a single row retrieved, it should
be possible to use range queries and ORDER BY with a second index:

CREATE TABLE somedata (
subscriberId varchar,
unitId int,
event varchar,
severity int, //1, 2, or 3
time timeuuid,
PRIMARY KEY ((subscriberId, unitId), time)
);

CREATE INDEX somedataindex ON somedata (severity);

SELECT * FROM somedata WHERE subscriberId=? AND unitId=? AND severity=?
AND time>=? AND time<=? ORDER BY TIME

If my understanding of the architecture is correct, this should not encounter the limitations
of the secondary index being a hash with data spread over multiple partitions. If this is
limited by the architecture, please help me understand why. I see having this functionality
as opening up a number of additional possibilities in using the secondary indices.

  was:
For instances when time series data is being stored and a single row retrieved, it should
be possible to use range queries and ORDER BY with a second index:

CREATE TABLE somedata (
subscriberId varchar,
unitId int,
event varchar,
severity int, //1, 2, or 3
time timeuuid,
PRIMARY KEY ((subscriberId, unitId), time)
);

CREATE INDEX somedataindex ON somedata (severity);

SELECT * FROM somedata WHERE subscriberId=? AND unitId=?
WHERE time>=? AND time<=? ORDER BY TIME

If my understanding of the architecture is correct, this should not encounter the limitations
of the secondary index being a hash with data spread over multiple partitions. If this is
limited by the architecture, please help me understand why. I see having this functionality
as opening up a number of additional possibilities in using the secondary indices.


> Range queries/ORDER BY should be possible with a secondary index for a single row
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-8509
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8509
>             Project: Cassandra
>          Issue Type: Improvement
>         Environment: Linux server latest debian release
>            Reporter: Jason Kania
>            Priority: Minor
>
> For instances when time series data is being stored and a single row retrieved, it should
be possible to use range queries and ORDER BY with a second index:
> CREATE TABLE somedata (
> subscriberId varchar,
> unitId int,
> event varchar,
> severity int, //1, 2, or 3
> time timeuuid,
> PRIMARY KEY ((subscriberId, unitId), time)
> );
> CREATE INDEX somedataindex ON somedata (severity);
> SELECT * FROM somedata WHERE subscriberId=? AND unitId=? AND severity=?
> AND time>=? AND time<=? ORDER BY TIME
> If my understanding of the architecture is correct, this should not encounter the limitations
of the secondary index being a hash with data spread over multiple partitions. If this is
limited by the architecture, please help me understand why. I see having this functionality
as opening up a number of additional possibilities in using the secondary indices.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message