{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/83515793","pull_request_review_id":4358131,"id":83515793,"diff_hunk":"@@ -1163,6 +1163,11 @@\n     \"create index fact_values_value_float_idx on fact_values(value_float)\"\n     \"create index fact_values_value_integer_idx on fact_values(value_integer)\"))\n \n+(defn add-corrective-change-index\n+  []\n+  (jdbc/do-commands\n+    \"CREATE INDEX resource_events_status_for_corrective_change_idx ON resource_events (status) WHERE corrective_change;\"))","path":"src/puppetlabs/puppetdb/scf/migrate.clj","position":null,"original_position":7,"commit_id":"b56ae3afa365ba9749b23b685192cb2f341703c8","original_commit_id":"280fcc76a4cb357b0ab1c0c13431003544b281d9","user":{"login":"wkalt","id":4952091,"avatar_url":"https://avatars.githubusercontent.com/u/4952091?v=3","gravatar_id":"","url":"https://api.github.com/users/wkalt","html_url":"https://github.com/wkalt","followers_url":"https://api.github.com/users/wkalt/followers","following_url":"https://api.github.com/users/wkalt/following{/other_user}","gists_url":"https://api.github.com/users/wkalt/gists{/gist_id}","starred_url":"https://api.github.com/users/wkalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkalt/subscriptions","organizations_url":"https://api.github.com/users/wkalt/orgs","repos_url":"https://api.github.com/users/wkalt/repos","events_url":"https://api.github.com/users/wkalt/events{/privacy}","received_events_url":"https://api.github.com/users/wkalt/received_events","type":"User","site_admin":false},"body":"In https://github.com/puppetlabs/puppetdb/pull/2078 I was envisioning this as an index on corrective_change where corrective_change=true. Part of the idea there was to benefit consumers other than the console. Have we checked to see if this index gives any benefit over that one?","created_at":"2016-10-14T23:11:16Z","updated_at":"2016-10-14T23:11:16Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/2092#discussion_r83515793","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/83515793"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/2092#discussion_r83515793"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092","id":88840246,"html_url":"https://github.com/puppetlabs/puppetdb/pull/2092","diff_url":"https://github.com/puppetlabs/puppetdb/pull/2092.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/2092.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/2092","number":2092,"state":"open","locked":false,"title":"(PDB-3092) Create a partial index in resource_events for querying by corrective events","user":{"login":"kbrezina","id":213465,"avatar_url":"https://avatars.githubusercontent.com/u/213465?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrezina","html_url":"https://github.com/kbrezina","followers_url":"https://api.github.com/users/kbrezina/followers","following_url":"https://api.github.com/users/kbrezina/following{/other_user}","gists_url":"https://api.github.com/users/kbrezina/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrezina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrezina/subscriptions","organizations_url":"https://api.github.com/users/kbrezina/orgs","repos_url":"https://api.github.com/users/kbrezina/repos","events_url":"https://api.github.com/users/kbrezina/events{/privacy}","received_events_url":"https://api.github.com/users/kbrezina/received_events","type":"User","site_admin":false},"body":"The main purpose of this index is to help `resource_events` queries with `corrective_change = true` - that is the case of `PE Events` queries.\r\n\r\nIt's expected that minority of events are corrective, so the partial index wouldn't consume a lot of disk space and improve performance.","created_at":"2016-10-11T14:14:10Z","updated_at":"2016-10-14T23:11:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0263d073bc258a36ab959e6cc3dfded2c8f4666","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/2092/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/b56ae3afa365ba9749b23b685192cb2f341703c8","head":{"label":"kbrezina:pdb-3092_create_idx","ref":"pdb-3092_create_idx","sha":"b56ae3afa365ba9749b23b685192cb2f341703c8","user":{"login":"kbrezina","id":213465,"avatar_url":"https://avatars.githubusercontent.com/u/213465?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrezina","html_url":"https://github.com/kbrezina","followers_url":"https://api.github.com/users/kbrezina/followers","following_url":"https://api.github.com/users/kbrezina/following{/other_user}","gists_url":"https://api.github.com/users/kbrezina/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrezina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrezina/subscriptions","organizations_url":"https://api.github.com/users/kbrezina/orgs","repos_url":"https://api.github.com/users/kbrezina/repos","events_url":"https://api.github.com/users/kbrezina/events{/privacy}","received_events_url":"https://api.github.com/users/kbrezina/received_events","type":"User","site_admin":false},"repo":{"id":42270492,"name":"puppetdb","full_name":"kbrezina/puppetdb","owner":{"login":"kbrezina","id":213465,"avatar_url":"https://avatars.githubusercontent.com/u/213465?v=3","gravatar_id":"","url":"https://api.github.com/users/kbrezina","html_url":"https://github.com/kbrezina","followers_url":"https://api.github.com/users/kbrezina/followers","following_url":"https://api.github.com/users/kbrezina/following{/other_user}","gists_url":"https://api.github.com/users/kbrezina/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrezina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrezina/subscriptions","organizations_url":"https://api.github.com/users/kbrezina/orgs","repos_url":"https://api.github.com/users/kbrezina/repos","events_url":"https://api.github.com/users/kbrezina/events{/privacy}","received_events_url":"https://api.github.com/users/kbrezina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kbrezina/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/kbrezina/puppetdb","forks_url":"https://api.github.com/repos/kbrezina/puppetdb/forks","keys_url":"https://api.github.com/repos/kbrezina/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbrezina/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbrezina/puppetdb/teams","hooks_url":"https://api.github.com/repos/kbrezina/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/kbrezina/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/kbrezina/puppetdb/events","assignees_url":"https://api.github.com/repos/kbrezina/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/kbrezina/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/kbrezina/puppetdb/tags","blobs_url":"https://api.github.com/repos/kbrezina/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbrezina/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbrezina/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbrezina/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbrezina/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/kbrezina/puppetdb/languages","stargazers_url":"https://api.github.com/repos/kbrezina/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/kbrezina/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/kbrezina/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/kbrezina/puppetdb/subscription","commits_url":"https://api.github.com/repos/kbrezina/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbrezina/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbrezina/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbrezina/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbrezina/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/kbrezina/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbrezina/puppetdb/merges","archive_url":"https://api.github.com/repos/kbrezina/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbrezina/puppetdb/downloads","issues_url":"https://api.github.com/repos/kbrezina/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/kbrezina/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/kbrezina/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/kbrezina/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbrezina/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/kbrezina/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/kbrezina/puppetdb/deployments","created_at":"2015-09-10T21:01:10Z","updated_at":"2015-09-10T21:01:11Z","pushed_at":"2016-10-14T15:07:00Z","git_url":"git://github.com/kbrezina/puppetdb.git","ssh_url":"git@github.com:kbrezina/puppetdb.git","clone_url":"https://github.com/kbrezina/puppetdb.git","svn_url":"https://github.com/kbrezina/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":16755,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"puppetlabs:master","ref":"master","sha":"35710f7f029f0761c53151a19b70ed87f67a2e9e","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2193032,"name":"puppetdb","full_name":"puppetlabs/puppetdb","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetdb","description":"Centralized Puppet Storage","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetdb","forks_url":"https://api.github.com/repos/puppetlabs/puppetdb/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetdb/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetdb/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetdb/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetdb/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetdb/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetdb/deployments","created_at":"2011-08-11T18:54:46Z","updated_at":"2016-09-23T10:07:04Z","pushed_at":"2016-10-14T19:03:18Z","git_url":"git://github.com/puppetlabs/puppetdb.git","ssh_url":"git@github.com:puppetlabs/puppetdb.git","clone_url":"https://github.com/puppetlabs/puppetdb.git","svn_url":"https://github.com/puppetlabs/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":20510,"stargazers_count":195,"watchers_count":195,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":162,"mirror_url":null,"open_issues_count":8,"forks":162,"open_issues":8,"watchers":195,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/2092"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/2092"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/2092/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/2092/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/b56ae3afa365ba9749b23b685192cb2f341703c8"}}}}
{"actor":{"display_login":"wkalt"}}