performance impact when setting limit

11 views
Skip to first unread message

Avi

unread,
Aug 25, 2017, 8:32:39 AM8/25/17
to DataStax Java Driver for Apache Cassandra User Mailing List
is there any difference in performance between this two queries 

1. SELECT COUNT(*) FROM big_table ;
2. SELECT COUNT(*) FROM big_table LIMIT Int.MAX_VALUE;

Andrew Tolbert

unread,
Aug 30, 2017, 12:34:10 PM8/30/17
to DataStax Java Driver for Apache Cassandra User Mailing List
Hello,

Can you explain why you would use LIMIT Int.MAX_VALUE in the first place?  As far as performance goes, I'm not certain of what to expect, but I think it would be nearly the same, maybe some extra time (which may be negligible) parsing the query since it has extra criteria.

Thanks,
Andy
Reply all
Reply to author
Forward
0 new messages