You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org> on 2012/01/27 15:58:11 UTC
[jira] [Commented] (CASSANDRA-3798) get_count paging often asks for
a page uselessly
[ https://issues.apache.org/jira/browse/CASSANDRA-3798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194818#comment-13194818 ]
Jonathan Ellis commented on CASSANDRA-3798:
-------------------------------------------
+1
> get_count paging often asks for a page uselessly
> ------------------------------------------------
>
> Key: CASSANDRA-3798
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3798
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 1.0.0
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 1.1
>
> Attachments: 3798.patch
>
>
> Current get_count paging stopping condition is:
> {noformat}
> if ((requestedCount == 0) || ((columns.size() == 1) && (lastName.equals(predicate.slice_range.start))))
> {
> break;
> }
> {noformat}
> On a "count how many columns this row has" query (arguably the main reason why you'd use get_count), requestedCount will never be 0, and so we'll stop whenever a page has only returned the last column of the preceding page. While this isn't wrong, we could stop as soon as a page returns less element than requested and avoid querying that last 1 column page.
--
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