{"action":"created","issue":{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/122","labels_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/122/comments","events_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/122/events","html_url":"https://github.com/vsivsi/meteor-job-collection/issues/122","id":113309414,"number":122,"title":"_ensureIndex on more fields","user":{"login":"mitar","id":585279,"avatar_url":"https://avatars.githubusercontent.com/u/585279?v=3","gravatar_id":"","url":"https://api.github.com/users/mitar","html_url":"https://github.com/mitar","followers_url":"https://api.github.com/users/mitar/followers","following_url":"https://api.github.com/users/mitar/following{/other_user}","gists_url":"https://api.github.com/users/mitar/gists{/gist_id}","starred_url":"https://api.github.com/users/mitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitar/subscriptions","organizations_url":"https://api.github.com/users/mitar/orgs","repos_url":"https://api.github.com/users/mitar/repos","events_url":"https://api.github.com/users/mitar/events{/privacy}","received_events_url":"https://api.github.com/users/mitar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-26T08:50:57Z","updated_at":"2015-12-02T14:51:41Z","closed_at":null,"body":"Should we have indexes also on:\r\n\r\n```\r\ncollection._ensureIndex\r\n  priority: 1\r\n  retryUntil: 1\r\n  after: 1\r\n```\r\n\r\n`getWork` sorts by those fields.\r\n\r\nI have not measured anything, this is just by observing queries."},"comment":{"url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/comments/161321283","html_url":"https://github.com/vsivsi/meteor-job-collection/issues/122#issuecomment-161321283","issue_url":"https://api.github.com/repos/vsivsi/meteor-job-collection/issues/122","id":161321283,"user":{"login":"aldeed","id":3012067,"avatar_url":"https://avatars.githubusercontent.com/u/3012067?v=3","gravatar_id":"","url":"https://api.github.com/users/aldeed","html_url":"https://github.com/aldeed","followers_url":"https://api.github.com/users/aldeed/followers","following_url":"https://api.github.com/users/aldeed/following{/other_user}","gists_url":"https://api.github.com/users/aldeed/gists{/gist_id}","starred_url":"https://api.github.com/users/aldeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aldeed/subscriptions","organizations_url":"https://api.github.com/users/aldeed/orgs","repos_url":"https://api.github.com/users/aldeed/repos","events_url":"https://api.github.com/users/aldeed/events{/privacy}","received_events_url":"https://api.github.com/users/aldeed/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T14:51:41Z","updated_at":"2015-12-02T14:51:41Z","body":"@mitar @vsivsi It seems like a single key index on `status` is also needed. This is currently listed as the slowest query on our Compose:\r\n\r\n<img width=\"768\" alt=\"screenshot 2015-12-02 08 46 58\" src=\"https://cloud.githubusercontent.com/assets/3012067/11533896/a226e122-98d1-11e5-91da-01786efe755f.png\">\r\n\r\nUsing package version 1.2.2"}}