what would you use ?
SELECT COUNT(*) FROM "users"
In earlier versions, User.all.count executes: SELECT "users".* FROM "users"
because it is pulling back all fields from all users into memory, instead of just asking the database to check the index for a count."Users.all.count" will needlessly read in all users into memory and then return a count. That might work OK for 1000 users, but beyond that?