I have a Post model name. When I try to start Post.count I get the result without any problems. However, I suspect that Ruby is used to count the number of messages returned.
Instead, I would like to use SQL to count the number of messages, as this is much faster.
The only thing I found for this using Arel is Post.select("COUNT(id)") . Can't run the count command without explicitly calling select on the model? Thanks!
source share