{"action":"created","issue":{"url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/346","labels_url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/346/comments","events_url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/346/events","html_url":"https://github.com/mitsuhiko/flask-sqlalchemy/pull/346","id":115449714,"number":346,"title":"improve count speed in paginate","user":{"login":"dingyaguang117","id":1930778,"avatar_url":"https://avatars.githubusercontent.com/u/1930778?v=3","gravatar_id":"","url":"https://api.github.com/users/dingyaguang117","html_url":"https://github.com/dingyaguang117","followers_url":"https://api.github.com/users/dingyaguang117/followers","following_url":"https://api.github.com/users/dingyaguang117/following{/other_user}","gists_url":"https://api.github.com/users/dingyaguang117/gists{/gist_id}","starred_url":"https://api.github.com/users/dingyaguang117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dingyaguang117/subscriptions","organizations_url":"https://api.github.com/users/dingyaguang117/orgs","repos_url":"https://api.github.com/users/dingyaguang117/repos","events_url":"https://api.github.com/users/dingyaguang117/events{/privacy}","received_events_url":"https://api.github.com/users/dingyaguang117/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-06T06:57:42Z","updated_at":"2015-11-06T07:04:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/pulls/346","html_url":"https://github.com/mitsuhiko/flask-sqlalchemy/pull/346","diff_url":"https://github.com/mitsuhiko/flask-sqlalchemy/pull/346.diff","patch_url":"https://github.com/mitsuhiko/flask-sqlalchemy/pull/346.patch"},"body":"instead\nSELECT count(1) AS count_1 FROM (\nSELECT <rest of query follows...>\n) AS anon_1\nof\nSELECT COUNT(*) FROM table"},"comment":{"url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/comments/154330784","html_url":"https://github.com/mitsuhiko/flask-sqlalchemy/pull/346#issuecomment-154330784","issue_url":"https://api.github.com/repos/mitsuhiko/flask-sqlalchemy/issues/346","id":154330784,"user":{"login":"RonnyPfannschmidt","id":156838,"avatar_url":"https://avatars.githubusercontent.com/u/156838?v=3","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T07:04:10Z","updated_at":"2015-11-06T07:04:10Z","body":"Did you verify this gives correct results on all involved databases?\r\n\r\nI recall sqlalchemy count choosing the slower path due to edge cases in the fast path"}}