[ 
https://issues.apache.org/jira/browse/CASSANDRA-8216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15142433#comment-15142433
 ] 

Benjamin Lerer commented on CASSANDRA-8216:
-------------------------------------------

{quote}The prestodb (https://prestodb.io/) query engine was using this query to 
estimate the number of rows in the table (perhaps incorrectly), and now that 
count(\*) accurately returns everything its slow and incorrect.{quote}
[~nimi] I am not sure I fully understand your statement. Obviously, {{count}} 
queries with a {{limit}} will be slower now as they have to count all the 
existing rows. The fact that you say it is incorrect is more suspicious to me. 
Are you talking of the results returned by Prestodb or by Cassandra?

There is currently no way to get the old behavior. If the old behavior is 
really what you need, you will have to issue a SELECT query with a limit and 
count the rows in the client side.

> Select Count with Limit returns wrong value
> -------------------------------------------
>
>                 Key: CASSANDRA-8216
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8216
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Philip Thompson
>            Assignee: Benjamin Lerer
>              Labels: qa-resolved
>             Fix For: 2.2.0 beta 1
>
>
> The dtest cql_tests.py:TestCQL.select_count_paging_test is failing on trunk 
> HEAD but not 2.1-HEAD.
> The query {code} select count(*) from test where field3 = false limit 1; 
> {code} is returning 2, where obviously it should only return 1 because of the 
> limit. This may end up having the same root cause of #8214, I will be 
> bisecting them both soon.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to