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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -