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


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

        

Reply via email to