cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Jurik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6377) ALLOW FILTERING should allow seq scan filtering
Date Thu, 21 Nov 2013 09:36:41 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828640#comment-13828640
] 

Matt Jurik commented on CASSANDRA-6377:
---------------------------------------

This is close to what I've been looking for. It'd be nice to be able to do queries such as
"SELECT * FROM tbl WHERE pk=123 AND unindexed_col=456;"

It occasionally happens that we want only a small subset of data and don't want to incur extra
rounds of serialization/deserialization + network overhead in moving an entire partition to
our app layer, just so the app layer can throw away megabytes of data that cassandra could
have done itself. While ALLOW FILTERING queries shouldn't be your app's bread-and-butter,
I think there are plenty of creative use cases besides "playing with data in cqlsh."

I hope these queries aren't at the limits of what CQL3 has to offer...

> ALLOW FILTERING should allow seq scan filtering
> -----------------------------------------------
>
>                 Key: CASSANDRA-6377
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6377
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 1.2.13
>
>
> CREATE TABLE emp_table2 (
>         empID int PRIMARY KEY,
>         firstname text,
>         lastname text,
>         b_mon text,
>         b_day text,
>         b_yr text,
> );
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>    VALUES (100,'jane','doe','oct','31','1980');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>    VALUES (101,'john','smith','jan','01','1981');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>    VALUES (102,'mary','jones','apr','15','1982');
> INSERT INTO emp_table2 (empID,firstname,lastname,b_mon,b_day,b_yr) 
>    VALUES (103,'tim','best','oct','25','1982');
>    
> SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 
>     WHERE b_mon='oct' ALLOW FILTERING;
> Bad Request: No indexed columns present in by-columns clause with Equal operator



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message