Skip to content

Instantly share code, notes, and snippets.

@breinero-zz
Created May 31, 2015 13:39
Show Gist options
  • Save breinero-zz/2b584609248e9cda190f to your computer and use it in GitHub Desktop.
Save breinero-zz/2b584609248e9cda190f to your computer and use it in GitHub Desktop.
for (var i=0; i<1000; i++) { db.blog.insert( { "headline" : i, "date" : i + 1, "section" : i+2 } ); }
- db.blog.find( { "headline" : 200 } )
- db.blog.find( { "headline" : 200, section: 50 } ) - which order should the index be in?
- db.blog.find( { "headline" : 200 }).sort( { "date" : -1 }) - index?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment