{"action":"created","issue":{"url":"https://api.github.com/repos/Elastica/kombu/issues/17","labels_url":"https://api.github.com/repos/Elastica/kombu/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Elastica/kombu/issues/17/comments","events_url":"https://api.github.com/repos/Elastica/kombu/issues/17/events","html_url":"https://github.com/Elastica/kombu/pull/17","id":68273017,"number":17,"title":"refs #19030 bound the distinct query and replace the count query with fi...","user":{"login":"jkothamb","id":5266692,"avatar_url":"https://avatars.githubusercontent.com/u/5266692?v=3","gravatar_id":"","url":"https://api.github.com/users/jkothamb","html_url":"https://github.com/jkothamb","followers_url":"https://api.github.com/users/jkothamb/followers","following_url":"https://api.github.com/users/jkothamb/following{/other_user}","gists_url":"https://api.github.com/users/jkothamb/gists{/gist_id}","starred_url":"https://api.github.com/users/jkothamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkothamb/subscriptions","organizations_url":"https://api.github.com/users/jkothamb/orgs","repos_url":"https://api.github.com/users/jkothamb/repos","events_url":"https://api.github.com/users/jkothamb/events{/privacy}","received_events_url":"https://api.github.com/users/jkothamb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ChaksChigurupati","id":1891843,"avatar_url":"https://avatars.githubusercontent.com/u/1891843?v=3","gravatar_id":"","url":"https://api.github.com/users/ChaksChigurupati","html_url":"https://github.com/ChaksChigurupati","followers_url":"https://api.github.com/users/ChaksChigurupati/followers","following_url":"https://api.github.com/users/ChaksChigurupati/following{/other_user}","gists_url":"https://api.github.com/users/ChaksChigurupati/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaksChigurupati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaksChigurupati/subscriptions","organizations_url":"https://api.github.com/users/ChaksChigurupati/orgs","repos_url":"https://api.github.com/users/ChaksChigurupati/repos","events_url":"https://api.github.com/users/ChaksChigurupati/events{/privacy}","received_events_url":"https://api.github.com/users/ChaksChigurupati/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-04-14T06:11:21Z","updated_at":"2015-04-14T18:01:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Elastica/kombu/pulls/17","html_url":"https://github.com/Elastica/kombu/pull/17","diff_url":"https://github.com/Elastica/kombu/pull/17.diff","patch_url":"https://github.com/Elastica/kombu/pull/17.patch"},"body":"This PR contains the following two fixes:\r\n\r\n- Bound the distinct query by using latest id of the latest task in the messages collection\r\n- celery/kombu uses a count query when declaring queue which is redundant when using the mongo as the underlying transport. "},"comment":{"url":"https://api.github.com/repos/Elastica/kombu/issues/comments/93000232","html_url":"https://github.com/Elastica/kombu/pull/17#issuecomment-93000232","issue_url":"https://api.github.com/repos/Elastica/kombu/issues/17","id":93000232,"user":{"login":"jkothamb","id":5266692,"avatar_url":"https://avatars.githubusercontent.com/u/5266692?v=3","gravatar_id":"","url":"https://api.github.com/users/jkothamb","html_url":"https://github.com/jkothamb","followers_url":"https://api.github.com/users/jkothamb/followers","following_url":"https://api.github.com/users/jkothamb/following{/other_user}","gists_url":"https://api.github.com/users/jkothamb/gists{/gist_id}","starred_url":"https://api.github.com/users/jkothamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkothamb/subscriptions","organizations_url":"https://api.github.com/users/jkothamb/orgs","repos_url":"https://api.github.com/users/jkothamb/repos","events_url":"https://api.github.com/users/jkothamb/events{/privacy}","received_events_url":"https://api.github.com/users/jkothamb/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T18:01:58Z","updated_at":"2015-04-14T18:01:58Z","body":"@ChaksChigurupati : Regarding putting a floor on the distinct query call, @aganapat  based on his experiment seems to perform better and I tested with 1.8M jobs in queue belonging to just one tenant. This is not a final fix and if this change doesn't perform as expected , we can proceed with using the tenants information in elastica_admin db. "}}