Created
December 8, 2011 23:11
-
-
Save joeyAghion/1449172 to your computer and use it in GitHub Desktop.
benchmark of .where(:_id.in => [...]) vs. multiple .find MongoDB/Mongoid queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ bex rails benchmarker 1000 "Artwork.where(:_id.in => [<...100 doc ids...>]).map(&:title)" "[<...100 doc ids...>].map{|id| Artwork.find(id) }.map(&:title)" | |
| user system total real | |
| #1 112.410000 1.470000 113.880000 (116.483996) | |
| #2 151.740000 4.310000 156.050000 (166.557997) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment