Skip to content

Instantly share code, notes, and snippets.

@haarts
Created June 30, 2011 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haarts/1056741 to your computer and use it in GitHub Desktop.
Save haarts/1056741 to your computer and use it in GitHub Desktop.
One slow query
# This query takes only a fraction of a second locally and looong on heroku
# Heroku app name: floating-moon-774
# MongoHQ 'eko', app: 'app558262'
Marker.where(:finished => true, :operator_comment => false).desc(:created_at).limit(4)
# via 'heroku console':
>> puts Time.now ; 100.times { Marker.where(:finished => true, :operator_comment => false).desc(:created_at).limit(4).entries} ; puts Time.now
Thu Jun 30 07:22:40 -0700 2011
Thu Jun 30 07:23:29 -0700 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment