GitHub PullRequestEvent at 2014-01-20 16:28:26
Repository: spree
Actor: Willianvdv
Payload: {"action":"opened","number":4232,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/4232","id":11680720,"html_url":"https://github.com/spree/spree/pull/4232","diff_url":"https://github.com/spree/spree/pull/4232.diff","patch_url":"https://github.com/spree/spree/pull/4232.patch","issue_url":"https://github.com/spree/spree/pull/4232","number":4232,"state":"open","title":"Added missing index for variant_id and currency on spree_prices","user":{"login":"Willianvdv","id":102915,"avatar_url":"https://gravatar.com/avatar/359ecf9aef93093b8314f8298a04794f?d=https%3A%2F%2Fidenticons.github.com%2F65824241fbf1e544814bef0a65f9d27d.png&r=x","gravatar_id":"359ecf9aef93093b8314f8298a04794f","url":"https://api.github.com/users/Willianvdv","html_url":"https://github.com/Willianvdv","followers_url":"https://api.github.com/users/Willianvdv/followers","following_url":"https://api.github.com/users/Willianvdv/following{/other_user}","gists_url":"https://api.github.com/users/Willianvdv/gists{/gist_id}","starred_url":"https://api.github.com/users/Willianvdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Willianvdv/subscriptions","organizations_url":"https://api.github.com/users/Willianvdv/orgs","repos_url":"https://api.github.com/users/Willianvdv/repos","events_url":"https://api.github.com/users/Willianvdv/events{/privacy}","received_events_url":"https://api.github.com/users/Willianvdv/received_events","type":"User","site_admin":false},"body":"This query to get products from a taxon\r\n```\r\nSELECT COUNT(*) FROM \"spree_products\" INNER JOIN \"spree_variants\" ON \"spree_variants\".\"product_id\" = \"spree_products\".\"id\" AND \"spree_variants\".\"is_master\" = 't' AND \"spree_variants\".\"deleted_at\" IS NULL INNER JOIN \"spree_prices\" ON \"spree_prices\".\"variant_id\" = \"spree_variants\".\"id\" WHERE \"spree_products\".\"deleted_at\" IS NULL AND (\"spree_products\".deleted_at IS NULL or \"spree_products\".deleted_at >= '2014-01-20 15:33:58.341590') AND (\"spree_products\".available_on <= '2014-01-20 15:33:58.341879') AND \"spree_products\".\"id\" IN (SELECT spree_products_taxons.product_id FROM \"spree_products_taxons\" INNER JOIN \"spree_taxons\" ON \"spree_taxons\".\"id\" = \"spree_products_taxons\".\"taxon_id\" WHERE \"spree_taxons\".\"id\" IN (8970)) AND (spree_prices.amount IS NOT NULL) AND \"spree_prices\".\"currency\" = 'EUR';\r\n``` \r\n\r\nBefore:\r\n```\r\nTime: 43.675 ms\r\n```\r\n\r\nAfter adding indexes:\r\n\r\n```\r\nTime: 2.752 ms\r\n```","created_at":"2014-01-20T16:28:25Z","updated_at":"2014-01-20T16:28:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://github.com/spree/spree/pull/4232/commits","review_comments_url":"https://github.com/spree/spree/pull/4232/comments","review_comment_url":"/repos/spree/spree/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spree/spree/issues/4232/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/cbc375dc9ac34ec6f416e7d4f393c5a9a9dc0490","head":{"label":"Willianvdv:index_for_prices","ref":"index_for_prices","sha":"cbc375dc9ac34ec6f416e7d4f393c5a9a9dc0490","user":{"login":"Willianvdv","id":102915,"avatar_url":"https://gravatar.com/avatar/359ecf9aef93093b8314f8298a04794f?d=https%3A%2F%2Fidenticons.github.com%2F65824241fbf1e544814bef0a65f9d27d.png&r=x","gravatar_id":"359ecf9aef93093b8314f8298a04794f","url":"https://api.github.com/users/Willianvdv","html_url":"https://github.com/Willianvdv","followers_url":"https://api.github.com/users/Willianvdv/followers","following_url":"https://api.github.com/users/Willianvdv/following{/other_user}","gists_url":"https://api.github.com/users/Willianvdv/gists{/gist_id}","starred_url":"https://api.github.com/users/Willianvdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Willianvdv/subscriptions","organizations_url":"https://api.github.com/users/Willianvdv/orgs","repos_url":"https://api.github.com/users/Willianvdv/repos","events_url":"https://api.github.com/users/Willianvdv/events{/privacy}","received_events_url":"https://api.github.com/users/Willianvdv/received_events","type":"User","site_admin":false},"repo":{"id":14561372,"name":"spree","full_name":"Willianvdv/spree","owner":{"login":"Willianvdv","id":102915,"avatar_url":"https://gravatar.com/avatar/359ecf9aef93093b8314f8298a04794f?d=https%3A%2F%2Fidenticons.github.com%2F65824241fbf1e544814bef0a65f9d27d.png&r=x","gravatar_id":"359ecf9aef93093b8314f8298a04794f","url":"https://api.github.com/users/Willianvdv","html_url":"https://github.com/Willianvdv","followers_url":"https://api.github.com/users/Willianvdv/followers","following_url":"https://api.github.com/users/Willianvdv/following{/other_user}","gists_url":"https://api.github.com/users/Willianvdv/gists{/gist_id}","starred_url":"https://api.github.com/users/Willianvdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Willianvdv/subscriptions","organizations_url":"https://api.github.com/users/Willianvdv/orgs","repos_url":"https://api.github.com/users/Willianvdv/repos","events_url":"https://api.github.com/users/Willianvdv/events{/privacy}","received_events_url":"https://api.github.com/users/Willianvdv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Willianvdv/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/Willianvdv/spree","forks_url":"https://api.github.com/repos/Willianvdv/spree/forks","keys_url":"https://api.github.com/repos/Willianvdv/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Willianvdv/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Willianvdv/spree/teams","hooks_url":"https://api.github.com/repos/Willianvdv/spree/hooks","issue_events_url":"https://api.github.com/repos/Willianvdv/spree/issues/events{/number}","events_url":"https://api.github.com/repos/Willianvdv/spree/events","assignees_url":"https://api.github.com/repos/Willianvdv/spree/assignees{/user}","branches_url":"https://api.github.com/repos/Willianvdv/spree/branches{/branch}","tags_url":"https://api.github.com/repos/Willianvdv/spree/tags","blobs_url":"https://api.github.com/repos/Willianvdv/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Willianvdv/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Willianvdv/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/Willianvdv/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Willianvdv/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/Willianvdv/spree/languages","stargazers_url":"https://api.github.com/repos/Willianvdv/spree/stargazers","contributors_url":"https://api.github.com/repos/Willianvdv/spree/contributors","subscribers_url":"https://api.github.com/repos/Willianvdv/spree/subscribers","subscription_url":"https://api.github.com/repos/Willianvdv/spree/subscription","commits_url":"https://api.github.com/repos/Willianvdv/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/Willianvdv/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/Willianvdv/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/Willianvdv/spree/issues/comments/{number}","contents_url":"https://api.github.com/repos/Willianvdv/spree/contents/{+path}","compare_url":"https://api.github.com/repos/Willianvdv/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Willianvdv/spree/merges","archive_url":"https://api.github.com/repos/Willianvdv/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Willianvdv/spree/downloads","issues_url":"https://api.github.com/repos/Willianvdv/spree/issues{/number}","pulls_url":"https://api.github.com/repos/Willianvdv/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/Willianvdv/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/Willianvdv/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Willianvdv/spree/labels{/name}","releases_url":"https://api.github.com/repos/Willianvdv/spree/releases{/id}","created_at":"2013-11-20T16:07:36Z","updated_at":"2014-01-20T16:28:25Z","pushed_at":"2014-01-20T16:25:10Z","git_url":"git://github.com/Willianvdv/spree.git","ssh_url":"git@github.com:Willianvdv/spree.git","clone_url":"https://github.com/Willianvdv/spree.git","svn_url":"https://github.com/Willianvdv/spree","homepage":"http://spreecommerce.com","size":36895,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","master_branch":"master"}},"base":{"label":"spree:master","ref":"master","sha":"c9681eb1f421bd578be10036a52c45629efe13c9","user":{"login":"spree","id":56702,"avatar_url":"https://gravatar.com/avatar/a8a976a326bec5a34f35404dcb0d1fa6?d=https%3A%2F%2Fidenticons.github.com%2Fa4713247c553519f3d5df34d190cd021.png&r=x","gravatar_id":"a8a976a326bec5a34f35404dcb0d1fa6","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://gravatar.com/avatar/a8a976a326bec5a34f35404dcb0d1fa6?d=https%3A%2F%2Fidenticons.github.com%2Fa4713247c553519f3d5df34d190cd021.png&r=x","gravatar_id":"a8a976a326bec5a34f35404dcb0d1fa6","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments/{number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2014-01-20T12:35:55Z","pushed_at":"2014-01-20T12:35:55Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":74380,"stargazers_count":4680,"watchers_count":4680,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2071,"mirror_url":null,"open_issues_count":100,"forks":2071,"open_issues":100,"watchers":4680,"default_branch":"master","master_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/4232"},"html":{"href":"https://github.com/spree/spree/pull/4232"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/4232"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/4232/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/4232/comments"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/cbc375dc9ac34ec6f416e7d4f393c5a9a9dc0490"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":5,"deletions":0,"changed_files":1}}