Skip to content

Instantly share code, notes, and snippets.

@peterzawistowicz
Created May 27, 2015 21:11
Show Gist options
  • Save peterzawistowicz/13d16ce019eb55144cbc to your computer and use it in GitHub Desktop.
Save peterzawistowicz/13d16ce019eb55144cbc to your computer and use it in GitHub Desktop.
db.activity.find({ itemId: “301671", // requires a secondary index on timestamp + itemId
ts: {“$g”t:1301284969946,
“$lt”: 1425657300} })
.sort({ time: -1 }).limit(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment