[
https://issues.apache.org/jira/browse/CASSANDRA-3702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281626#comment-13281626
]
Sylvain Lebresne commented on CASSANDRA-3702:
---------------------------------------------
The patch overrides the row key bounds, so for instance won't work correctly
for {{SELECT count(*) FROM <cf> WHERE key='foo'}}. It also don't take a
potentially provided user LIMIT into account (I reckon it's dumb to give a
LIMIT when counting rows but we still need to support it correctly). Also, it
only page internal rows, but not within internal rows (and also,
makeSlicePredicate creates a predicate with a count of -1, so that won't work
with a getRangeSlice call that count keys instead of columns).
I think that unfortunately, to correctly page count(), you need to be able to
correctly page CQL3 queries in general, and that is a little bit more work
(since we basically need to handle both query by slices, query by names and
range queries underneath). I've (just) started work on handling such paging for
CASSANDRA-2478, and I really think there is no point in doing something
specific for count.
Getting back to the description of the issue, I note that imo we should stop
using a default limit of 10,000 for CQL queries as this is totally random.
> CQL count() needs paging support
> --------------------------------
>
> Key: CASSANDRA-3702
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3702
> Project: Cassandra
> Issue Type: Sub-task
> Components: Tools
> Reporter: Nick Bailey
> Assignee: Sam Tunnicliffe
> Labels: cql3, lhf
> Fix For: 1.1.2
>
> Attachments: v1-0001-CASSANDRA-3702-CQL-count-needs-paging-support.txt
>
>
> Doing
> {noformat}
> SELECT count(*) from <cf>;
> {noformat}
> will max out at 10,000 because that is the default limit for cql queries.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira