Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

benchmark of .where(:_id.in => [...]) vs. multiple .find MongoDB/Mongoid queries

View benchmark.bash
1 2 3 4
$ 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
Something went wrong with that request. Please try again.