{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/pg_shard/pulls/comments/23355935","id":23355935,"diff_hunk":"@@ -39,10 +39,20 @@\n #include \"utils/errcodes.h\"\n #include \"utils/lsyscache.h\"\n #include \"utils/typcache.h\"\n+#include \"utils/memutils.h\"\n+\n+\n+/*\n+ * OperatorTypeCache is used for caching base operator types for given typeId,\n+ * accessMethodId and strategyNumber. It is initialized to empty list as\n+ * there are no items in the cache.\n+ */\n+static List *OperatorTypeCache = NIL;\n \n \n /* local function forward declarations */\n static Oid GetOperatorByType(Oid typeId, Oid accessMethodId, int16 strategyNumber);\n+static Oid LookupOperatorByType(Oid typeId, Oid accessMethodId, int16 strategyNumber);","path":"prune_shard_list.c","position":17,"original_position":17,"commit_id":"2a49c31696b3008a3f19a277c771597c90884a27","original_commit_id":"2a49c31696b3008a3f19a277c771597c90884a27","user":{"login":"jasonmp85","id":50673,"avatar_url":"https://avatars.githubusercontent.com/u/50673?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmp85","html_url":"https://github.com/jasonmp85","followers_url":"https://api.github.com/users/jasonmp85/followers","following_url":"https://api.github.com/users/jasonmp85/following{/other_user}","gists_url":"https://api.github.com/users/jasonmp85/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmp85/subscriptions","organizations_url":"https://api.github.com/users/jasonmp85/orgs","repos_url":"https://api.github.com/users/jasonmp85/repos","events_url":"https://api.github.com/users/jasonmp85/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmp85/received_events","type":"User","site_admin":false},"body":"Move this up one line. The declaration and definition orders should match, but these declarations are in another order than the definitions.","created_at":"2015-01-22T05:15:12Z","updated_at":"2015-01-22T05:15:12Z","html_url":"https://github.com/citusdata/pg_shard/pull/57#discussion_r23355935","pull_request_url":"https://api.github.com/repos/citusdata/pg_shard/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/comments/23355935"},"html":{"href":"https://github.com/citusdata/pg_shard/pull/57#discussion_r23355935"},"pull_request":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/citusdata/pg_shard/pulls/57","id":27675279,"html_url":"https://github.com/citusdata/pg_shard/pull/57","diff_url":"https://github.com/citusdata/pg_shard/pull/57.diff","patch_url":"https://github.com/citusdata/pg_shard/pull/57.patch","issue_url":"https://api.github.com/repos/citusdata/pg_shard/issues/57","number":57,"state":"open","locked":false,"title":"pg_shard performance improvement","user":{"login":"onderkalaci","id":7829470,"avatar_url":"https://avatars.githubusercontent.com/u/7829470?v=3","gravatar_id":"","url":"https://api.github.com/users/onderkalaci","html_url":"https://github.com/onderkalaci","followers_url":"https://api.github.com/users/onderkalaci/followers","following_url":"https://api.github.com/users/onderkalaci/following{/other_user}","gists_url":"https://api.github.com/users/onderkalaci/gists{/gist_id}","starred_url":"https://api.github.com/users/onderkalaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onderkalaci/subscriptions","organizations_url":"https://api.github.com/users/onderkalaci/orgs","repos_url":"https://api.github.com/users/onderkalaci/repos","events_url":"https://api.github.com/users/onderkalaci/events{/privacy}","received_events_url":"https://api.github.com/users/onderkalaci/received_events","type":"User","site_admin":false},"body":"This branch implements a cache in front of  *GetOperatorByType* function, so that it prevents unnecessary calls to *GetDefaultOpClass* function.\r\n\r\nWith this implementation, we get the same performance improvement that we observed with @ozgune. I may send the details of the results via an email.\r\n\r\nfixes #50","created_at":"2015-01-20T12:54:18Z","updated_at":"2015-01-22T05:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abbff7d2e550ad995fb576424322bdee7a68b5e3","assignee":{"login":"jasonmp85","id":50673,"avatar_url":"https://avatars.githubusercontent.com/u/50673?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonmp85","html_url":"https://github.com/jasonmp85","followers_url":"https://api.github.com/users/jasonmp85/followers","following_url":"https://api.github.com/users/jasonmp85/following{/other_user}","gists_url":"https://api.github.com/users/jasonmp85/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmp85/subscriptions","organizations_url":"https://api.github.com/users/jasonmp85/orgs","repos_url":"https://api.github.com/users/jasonmp85/repos","events_url":"https://api.github.com/users/jasonmp85/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmp85/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/citusdata/pg_shard/pulls/57/commits","review_comments_url":"https://api.github.com/repos/citusdata/pg_shard/pulls/57/comments","review_comment_url":"https://api.github.com/repos/citusdata/pg_shard/pulls/comments/{number}","comments_url":"https://api.github.com/repos/citusdata/pg_shard/issues/57/comments","statuses_url":"https://api.github.com/repos/citusdata/pg_shard/statuses/2a49c31696b3008a3f19a277c771597c90884a27","head":{"label":"citusdata:feature-issue#50","ref":"feature-issue#50","sha":"2a49c31696b3008a3f19a277c771597c90884a27","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":27522888,"name":"pg_shard","full_name":"citusdata/pg_shard","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/pg_shard","description":"PostgreSQL extension to scale out real-time reads and writes","fork":false,"url":"https://api.github.com/repos/citusdata/pg_shard","forks_url":"https://api.github.com/repos/citusdata/pg_shard/forks","keys_url":"https://api.github.com/repos/citusdata/pg_shard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/pg_shard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/pg_shard/teams","hooks_url":"https://api.github.com/repos/citusdata/pg_shard/hooks","issue_events_url":"https://api.github.com/repos/citusdata/pg_shard/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/pg_shard/events","assignees_url":"https://api.github.com/repos/citusdata/pg_shard/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/pg_shard/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/pg_shard/tags","blobs_url":"https://api.github.com/repos/citusdata/pg_shard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/pg_shard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/pg_shard/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/pg_shard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/pg_shard/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/pg_shard/languages","stargazers_url":"https://api.github.com/repos/citusdata/pg_shard/stargazers","contributors_url":"https://api.github.com/repos/citusdata/pg_shard/contributors","subscribers_url":"https://api.github.com/repos/citusdata/pg_shard/subscribers","subscription_url":"https://api.github.com/repos/citusdata/pg_shard/subscription","commits_url":"https://api.github.com/repos/citusdata/pg_shard/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/pg_shard/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/pg_shard/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/pg_shard/issues/comments/{number}","contents_url":"https://api.github.com/repos/citusdata/pg_shard/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/pg_shard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/pg_shard/merges","archive_url":"https://api.github.com/repos/citusdata/pg_shard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/pg_shard/downloads","issues_url":"https://api.github.com/repos/citusdata/pg_shard/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/pg_shard/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/pg_shard/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/pg_shard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/pg_shard/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/pg_shard/releases{/id}","created_at":"2014-12-04T04:24:37Z","updated_at":"2015-01-22T00:34:23Z","pushed_at":"2015-01-22T01:08:01Z","git_url":"git://github.com/citusdata/pg_shard.git","ssh_url":"git@github.com:citusdata/pg_shard.git","clone_url":"https://github.com/citusdata/pg_shard.git","svn_url":"https://github.com/citusdata/pg_shard","homepage":"http://citusdata.com/docs/pg-shard","size":2164,"stargazers_count":606,"watchers_count":606,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":29,"forks":21,"open_issues":29,"watchers":606,"default_branch":"develop"}},"base":{"label":"citusdata:develop","ref":"develop","sha":"16079449a57a4797624cabb60fe0704004ae29bd","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":27522888,"name":"pg_shard","full_name":"citusdata/pg_shard","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars.githubusercontent.com/u/2545424?v=3","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/pg_shard","description":"PostgreSQL extension to scale out real-time reads and writes","fork":false,"url":"https://api.github.com/repos/citusdata/pg_shard","forks_url":"https://api.github.com/repos/citusdata/pg_shard/forks","keys_url":"https://api.github.com/repos/citusdata/pg_shard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/pg_shard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/pg_shard/teams","hooks_url":"https://api.github.com/repos/citusdata/pg_shard/hooks","issue_events_url":"https://api.github.com/repos/citusdata/pg_shard/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/pg_shard/events","assignees_url":"https://api.github.com/repos/citusdata/pg_shard/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/pg_shard/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/pg_shard/tags","blobs_url":"https://api.github.com/repos/citusdata/pg_shard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/pg_shard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/pg_shard/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/pg_shard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/pg_shard/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/pg_shard/languages","stargazers_url":"https://api.github.com/repos/citusdata/pg_shard/stargazers","contributors_url":"https://api.github.com/repos/citusdata/pg_shard/contributors","subscribers_url":"https://api.github.com/repos/citusdata/pg_shard/subscribers","subscription_url":"https://api.github.com/repos/citusdata/pg_shard/subscription","commits_url":"https://api.github.com/repos/citusdata/pg_shard/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/pg_shard/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/pg_shard/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/pg_shard/issues/comments/{number}","contents_url":"https://api.github.com/repos/citusdata/pg_shard/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/pg_shard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/pg_shard/merges","archive_url":"https://api.github.com/repos/citusdata/pg_shard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/pg_shard/downloads","issues_url":"https://api.github.com/repos/citusdata/pg_shard/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/pg_shard/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/pg_shard/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/pg_shard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/pg_shard/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/pg_shard/releases{/id}","created_at":"2014-12-04T04:24:37Z","updated_at":"2015-01-22T00:34:23Z","pushed_at":"2015-01-22T01:08:01Z","git_url":"git://github.com/citusdata/pg_shard.git","ssh_url":"git@github.com:citusdata/pg_shard.git","clone_url":"https://github.com/citusdata/pg_shard.git","svn_url":"https://github.com/citusdata/pg_shard","homepage":"http://citusdata.com/docs/pg-shard","size":2164,"stargazers_count":606,"watchers_count":606,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":29,"forks":21,"open_issues":29,"watchers":606,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/57"},"html":{"href":"https://github.com/citusdata/pg_shard/pull/57"},"issue":{"href":"https://api.github.com/repos/citusdata/pg_shard/issues/57"},"comments":{"href":"https://api.github.com/repos/citusdata/pg_shard/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/citusdata/pg_shard/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/pg_shard/statuses/2a49c31696b3008a3f19a277c771597c90884a27"}}}}