cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Naumov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5470) Query with condition on two secondary indexes can't be run without ALLOW FILTERING.
Date Mon, 15 Apr 2013 09:20:15 GMT
Sergey Naumov created CASSANDRA-5470:
----------------------------------------

             Summary: Query with condition on two secondary indexes can't be run without ALLOW
FILTERING.
                 Key: CASSANDRA-5470
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5470
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.3
         Environment: Apache Cassandra 1.2.3 installed from DataStax debian repository.
            Reporter: Sergey Naumov


While manual explicitly suggests to use multiple secondary indices (http://www.datastax.com/docs/1.2/ddl/indexes
- Using multiple secondary indexes), it is impossible to call such a query without ALLOW FILTERING
clause.

I have the following table:
cqlsh <<SQL
    DROP TABLE k1.tbl1;
    CREATE TABLE k1.tbl1 (
        id timeuuid,
        name varchar,
        regid int,
        date timestamp,
        time timestamp,
        payload varchar,
        PRIMARY KEY (id)
    );
    CREATE INDEX tbl1_name
        ON k1.tbl1 (name);
    CREATE INDEX tbl1_regid
        ON k1.tbl1 (regid);
    CREATE INDEX tbl1_date
        ON k1.tbl1 (date);
SQL

But when I'm trying to perform a query, error occured:
cqlsh> select * from k1.tbl1 where regid = 2 and name = 'DB49';
Bad Request: Cannot execute this query as it might involve data filtering and thus may have
unpredictable performance. If you want to execute this query despite the performance unpredictability,
use ALLOW FILTERING
Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.

With ALLOW FILTERING clause everything is OK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message