ruby on rails - Why does limit still return the entire document set in Mongoid? -
this seems causing queries slow, , i'm confused why returning entries of document.
>> product.skip(0).limit(20).count => 3826
thats behaviour of count(), returns count of records query touched
you need use size() count current set.
Comments
Post a Comment