You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jon Haddad (JIRA)" <ji...@apache.org> on 2017/08/28 22:23:00 UTC

[jira] [Resolved] (CASSANDRA-5406) Allow CQL3 queries to do extra filter after getting the column slice on a composite primary key

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

Jon Haddad resolved CASSANDRA-5406.
-----------------------------------
    Resolution: Duplicate

This has worked for a while now with ALLOW FILTERING and I believe is the result of CASSANDRA-6377.  Closing out as a duplicate.

> Allow CQL3 queries to do extra filter after getting the column slice on a composite primary key
> -----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-5406
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5406
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeremiah Jordan
>            Priority: Minor
>
> Let the following work:
> {noformat}
> CREATE TABLE "ChequeDeDup2" (
>   "bucketId" int,
>   "transitAba" int,
>   "transitAccount" bigint,
>   "serialNo" int,
>   amount bigint,
>   "subjectId" uuid,
>   "channelInd" ascii,
>   "creditAba" int,
>   "creditAccount" bigint,
>   "sourceTs" timestamp,
>   PRIMARY KEY ("bucketId", "transitAba", "transitAccount", "serialNo", amount, "subjectId")
> )
> select * from "ChequeDeDup2" where "bucketId" = 198 and "transitAba" >= 101 and "transitAccount" = 198 and "serialNo" = 1 and "amount" = -1 order by "transitAba" desc , "transitAccount" desc, "serialNo" desc, amount desc, "subjectId" DESC limit 5;
> Bad Request: PRIMARY KEY part transitAccount cannot be restricted (preceding part transitAba is either not restricted or by a non-EQ relation)
> {noformat}
> The assumption seems to be that it is better to serialize all the data with transitAba >= 198 back to the client side.  But it is *less* efficient for the server to serialize all this data back to the client than it is to execute subsequent filters.
> The user should be allowed to trade off the CPU cost of filtering the data on the server side with the IO cost of serializing all that data.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org