{"action":"closed","number":9,"pull_request":{"url":"https://api.github.com/repos/m-lab/bigsanity/pulls/9","id":55238440,"html_url":"https://github.com/m-lab/bigsanity/pull/9","diff_url":"https://github.com/m-lab/bigsanity/pull/9.diff","patch_url":"https://github.com/m-lab/bigsanity/pull/9.patch","issue_url":"https://api.github.com/repos/m-lab/bigsanity/issues/9","number":9,"state":"closed","locked":false,"title":"Optimizing equivalence queries","user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"body":"I realized we can lean on BigQuery more for the equivalence checks.\r\nInstead of doing one query on the per-month tables and one equivalent\r\nquery on the per-project table, then comparing results, we can do it all\r\nin a single BigQuery query.\r\n\r\nThis changes the queries so that they only return rows if there is a\r\nmismatch in test_ids between the two tables.\r\n\r\nThis allows faster processing because it's immediately half the total\r\nqueries and we can do queries over larger time windows because BigQuery\r\nshould be able to handle these queries more efficiently (less data to\r\nsend down to the client).\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/m-lab/bigsanity/9)\n<!-- Reviewable:end -->\n","created_at":"2016-01-06T17:17:09Z","updated_at":"2016-01-07T20:43:49Z","closed_at":"2016-01-07T20:43:49Z","merged_at":"2016-01-07T20:43:49Z","merge_commit_sha":"fe1d5e2949f4d6db3cb92b9b6ba5cda82771d3a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/9/commits","review_comments_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/9/comments","review_comment_url":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m-lab/bigsanity/issues/9/comments","statuses_url":"https://api.github.com/repos/m-lab/bigsanity/statuses/d277201498b7e003578c136570966e9db4fdd799","head":{"label":"mtlynch:optimize-queries","ref":"optimize-queries","sha":"d277201498b7e003578c136570966e9db4fdd799","user":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"repo":{"id":47427372,"name":"bigsanity","full_name":"mtlynch/bigsanity","owner":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtlynch/bigsanity","description":"M-Lab’s Big Data Sanity Checker","fork":true,"url":"https://api.github.com/repos/mtlynch/bigsanity","forks_url":"https://api.github.com/repos/mtlynch/bigsanity/forks","keys_url":"https://api.github.com/repos/mtlynch/bigsanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtlynch/bigsanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtlynch/bigsanity/teams","hooks_url":"https://api.github.com/repos/mtlynch/bigsanity/hooks","issue_events_url":"https://api.github.com/repos/mtlynch/bigsanity/issues/events{/number}","events_url":"https://api.github.com/repos/mtlynch/bigsanity/events","assignees_url":"https://api.github.com/repos/mtlynch/bigsanity/assignees{/user}","branches_url":"https://api.github.com/repos/mtlynch/bigsanity/branches{/branch}","tags_url":"https://api.github.com/repos/mtlynch/bigsanity/tags","blobs_url":"https://api.github.com/repos/mtlynch/bigsanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtlynch/bigsanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtlynch/bigsanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtlynch/bigsanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtlynch/bigsanity/statuses/{sha}","languages_url":"https://api.github.com/repos/mtlynch/bigsanity/languages","stargazers_url":"https://api.github.com/repos/mtlynch/bigsanity/stargazers","contributors_url":"https://api.github.com/repos/mtlynch/bigsanity/contributors","subscribers_url":"https://api.github.com/repos/mtlynch/bigsanity/subscribers","subscription_url":"https://api.github.com/repos/mtlynch/bigsanity/subscription","commits_url":"https://api.github.com/repos/mtlynch/bigsanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtlynch/bigsanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtlynch/bigsanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtlynch/bigsanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtlynch/bigsanity/contents/{+path}","compare_url":"https://api.github.com/repos/mtlynch/bigsanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtlynch/bigsanity/merges","archive_url":"https://api.github.com/repos/mtlynch/bigsanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtlynch/bigsanity/downloads","issues_url":"https://api.github.com/repos/mtlynch/bigsanity/issues{/number}","pulls_url":"https://api.github.com/repos/mtlynch/bigsanity/pulls{/number}","milestones_url":"https://api.github.com/repos/mtlynch/bigsanity/milestones{/number}","notifications_url":"https://api.github.com/repos/mtlynch/bigsanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtlynch/bigsanity/labels{/name}","releases_url":"https://api.github.com/repos/mtlynch/bigsanity/releases{/id}","created_at":"2015-12-04T20:32:24Z","updated_at":"2016-01-06T17:51:06Z","pushed_at":"2016-01-07T16:58:38Z","git_url":"git://github.com/mtlynch/bigsanity.git","ssh_url":"git@github.com:mtlynch/bigsanity.git","clone_url":"https://github.com/mtlynch/bigsanity.git","svn_url":"https://github.com/mtlynch/bigsanity","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"m-lab:master","ref":"master","sha":"ef0015bf7c46f575dec15f8b1984f1a24302482c","user":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":47427362,"name":"bigsanity","full_name":"m-lab/bigsanity","owner":{"login":"m-lab","id":3496264,"avatar_url":"https://avatars.githubusercontent.com/u/3496264?v=3","gravatar_id":"","url":"https://api.github.com/users/m-lab","html_url":"https://github.com/m-lab","followers_url":"https://api.github.com/users/m-lab/followers","following_url":"https://api.github.com/users/m-lab/following{/other_user}","gists_url":"https://api.github.com/users/m-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/m-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-lab/subscriptions","organizations_url":"https://api.github.com/users/m-lab/orgs","repos_url":"https://api.github.com/users/m-lab/repos","events_url":"https://api.github.com/users/m-lab/events{/privacy}","received_events_url":"https://api.github.com/users/m-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m-lab/bigsanity","description":"M-Lab’s Big Data Sanity Checker","fork":false,"url":"https://api.github.com/repos/m-lab/bigsanity","forks_url":"https://api.github.com/repos/m-lab/bigsanity/forks","keys_url":"https://api.github.com/repos/m-lab/bigsanity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-lab/bigsanity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-lab/bigsanity/teams","hooks_url":"https://api.github.com/repos/m-lab/bigsanity/hooks","issue_events_url":"https://api.github.com/repos/m-lab/bigsanity/issues/events{/number}","events_url":"https://api.github.com/repos/m-lab/bigsanity/events","assignees_url":"https://api.github.com/repos/m-lab/bigsanity/assignees{/user}","branches_url":"https://api.github.com/repos/m-lab/bigsanity/branches{/branch}","tags_url":"https://api.github.com/repos/m-lab/bigsanity/tags","blobs_url":"https://api.github.com/repos/m-lab/bigsanity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-lab/bigsanity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-lab/bigsanity/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-lab/bigsanity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-lab/bigsanity/statuses/{sha}","languages_url":"https://api.github.com/repos/m-lab/bigsanity/languages","stargazers_url":"https://api.github.com/repos/m-lab/bigsanity/stargazers","contributors_url":"https://api.github.com/repos/m-lab/bigsanity/contributors","subscribers_url":"https://api.github.com/repos/m-lab/bigsanity/subscribers","subscription_url":"https://api.github.com/repos/m-lab/bigsanity/subscription","commits_url":"https://api.github.com/repos/m-lab/bigsanity/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-lab/bigsanity/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-lab/bigsanity/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-lab/bigsanity/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-lab/bigsanity/contents/{+path}","compare_url":"https://api.github.com/repos/m-lab/bigsanity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-lab/bigsanity/merges","archive_url":"https://api.github.com/repos/m-lab/bigsanity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-lab/bigsanity/downloads","issues_url":"https://api.github.com/repos/m-lab/bigsanity/issues{/number}","pulls_url":"https://api.github.com/repos/m-lab/bigsanity/pulls{/number}","milestones_url":"https://api.github.com/repos/m-lab/bigsanity/milestones{/number}","notifications_url":"https://api.github.com/repos/m-lab/bigsanity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-lab/bigsanity/labels{/name}","releases_url":"https://api.github.com/repos/m-lab/bigsanity/releases{/id}","created_at":"2015-12-04T20:32:13Z","updated_at":"2015-12-10T16:30:29Z","pushed_at":"2016-01-07T20:43:49Z","git_url":"git://github.com/m-lab/bigsanity.git","ssh_url":"git@github.com:m-lab/bigsanity.git","clone_url":"https://github.com/m-lab/bigsanity.git","svn_url":"https://github.com/m-lab/bigsanity","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/9"},"html":{"href":"https://github.com/m-lab/bigsanity/pull/9"},"issue":{"href":"https://api.github.com/repos/m-lab/bigsanity/issues/9"},"comments":{"href":"https://api.github.com/repos/m-lab/bigsanity/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m-lab/bigsanity/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/m-lab/bigsanity/statuses/d277201498b7e003578c136570966e9db4fdd799"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mtlynch","id":7783288,"avatar_url":"https://avatars.githubusercontent.com/u/7783288?v=3","gravatar_id":"","url":"https://api.github.com/users/mtlynch","html_url":"https://github.com/mtlynch","followers_url":"https://api.github.com/users/mtlynch/followers","following_url":"https://api.github.com/users/mtlynch/following{/other_user}","gists_url":"https://api.github.com/users/mtlynch/gists{/gist_id}","starred_url":"https://api.github.com/users/mtlynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtlynch/subscriptions","organizations_url":"https://api.github.com/users/mtlynch/orgs","repos_url":"https://api.github.com/users/mtlynch/repos","events_url":"https://api.github.com/users/mtlynch/events{/privacy}","received_events_url":"https://api.github.com/users/mtlynch/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":255,"deletions":179,"changed_files":2}}