{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/comments/207949500","pull_request_review_id":143663657,"id":207949500,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzk0OTUwMA==","diff_hunk":"@@ -3,45 +3,69 @@\n \n [abstract]\n --\n-This section describes the operators used as part of a Cypher query's execution plan.\n+This section describes the characteristics of a query's execution plan, along with details about each of the operators.\n --\n \n+* <<execution-plan-introduction, Introduction>>\n+* <<execution-plan-operators-summary, Execution plan operators>>\n+* <<execution-plans-dbhits, DbHits (Database hits)>>\n+* <<query-shortestpath-planning, Shortest path planning>>\n+\n+\n+[[execution-plan-introduction]]\n+== Introduction\n+\n The task of executing a query is decomposed into _operators_, each of which implements a single unit of work.\n-The operators are combined into a structure called an _execution plan_.\n+The operators are combined into a tree-like structure called an _execution plan_, in which each operator is represented as a node in the tree.\n+Each operator takes as input zero or more rows, and produces as output zero or more rows -- the output from one operator thus forms the input for the next operator.\n+\n+.Evaluation model\n+The execution plan is evaluated from the bottom up, which means that evaluation begins at the _leaf_ nodes of the tree.\n+Leaf nodes have no input rows and generally comprise operators such as scans and seeks which obtain the data directly from the storage engine, thus incurring a <<execution-plans-dbhits, database hit>>.\n+Any rows produced by leaf nodes are then piped into their parent nodes, which in turn pipe their rows to their parent nodes and so on, all the way up to the root node, which produces the final results of the query.\n+\n+[[eagerness-laziness]]\n+.Eager and lazy evaluation\n+In general, query evaluation is _lazy_: most operators start piping their rows as soon as they are produced to their parent operators.\n+This means that a child operator may not be fully exhausted before the parent operator starts consuming the input rows produced by the child.\n \n+However, some operators, such as those used for aggregation and sorting, need to accumulate _all_ their rows before piping any of them to their parent operator(s); i.e. such an operator needs to complete execution in its entirety before _any_ rows are sent to its parent(s) as input.\n+These operators are called _eager_ operators, and are denoted as such in the execution plan.\n+Eagerness can cause high memory usage and may therefore be the cause of query performance issues.\n+\n+.Statistics\n Each operator is annotated with statistics.\n \n `Rows`::\n-The number of rows that the operator produced. Only available if the query was profiled.\n+The number of rows that the operator produced.\n+This is only available if the query was profiled.\n `EstimatedRows`::\n-If Neo4j used the cost-based compiler you will see the estimated number of rows that will be produced by the operator.\n+This is the estimated number of rows -- i.e. the approximate number of rows based on the available statistical information -- that will be produced by the operator.\n The compiler uses this estimate to choose a suitable execution plan.\n `DbHits`::\n Each operator will ask the Neo4j storage engine to do work such as retrieving or updating data.\n A _database hit_ is an abstract unit of this storage engine work.\n The actions triggering a database hit are listed <<execution-plans-dbhits, here>>.\n \n To produce an efficient plan for a query, Neo4j requires information about the database, such as which indexes and constraints are present (see <<cypher-schema>>).\n-Statistical information maintained by the database is also used to generate an efficient execution plan; i.e. the query engine uses this information to determine which access patterns will produce the best execution plan. \n+Statistical information maintained by the database is also used to generate an efficient execution plan; i.e. the query engine uses this information to determine which access patterns will produce the best execution plan.","path":"cypher/cypher-docs/src/docs/dev/execution-plans.asciidoc","position":54,"original_position":54,"commit_id":"307b56020a8912b4249df291448616ea4b9a84f3","original_commit_id":"307b56020a8912b4249df291448616ea4b9a84f3","user":{"login":"petraselmer","id":9249759,"node_id":"MDQ6VXNlcjkyNDk3NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9249759?v=4","gravatar_id":"","url":"https://api.github.com/users/petraselmer","html_url":"https://github.com/petraselmer","followers_url":"https://api.github.com/users/petraselmer/followers","following_url":"https://api.github.com/users/petraselmer/following{/other_user}","gists_url":"https://api.github.com/users/petraselmer/gists{/gist_id}","starred_url":"https://api.github.com/users/petraselmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petraselmer/subscriptions","organizations_url":"https://api.github.com/users/petraselmer/orgs","repos_url":"https://api.github.com/users/petraselmer/repos","events_url":"https://api.github.com/users/petraselmer/events{/privacy}","received_events_url":"https://api.github.com/users/petraselmer/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2018-08-06T16:16:17Z","updated_at":"2018-08-06T16:16:17Z","html_url":"https://github.com/neo4j/neo4j-documentation/pull/239#discussion_r207949500","pull_request_url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/comments/207949500"},"html":{"href":"https://github.com/neo4j/neo4j-documentation/pull/239#discussion_r207949500"},"pull_request":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239"}},"in_reply_to_id":207498351},"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239","id":205441283,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NDQxMjgz","html_url":"https://github.com/neo4j/neo4j-documentation/pull/239","diff_url":"https://github.com/neo4j/neo4j-documentation/pull/239.diff","patch_url":"https://github.com/neo4j/neo4j-documentation/pull/239.patch","issue_url":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/239","number":239,"state":"open","locked":false,"title":"Execution Plan Section Revamp","user":{"login":"petraselmer","id":9249759,"node_id":"MDQ6VXNlcjkyNDk3NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9249759?v=4","gravatar_id":"","url":"https://api.github.com/users/petraselmer","html_url":"https://github.com/petraselmer","followers_url":"https://api.github.com/users/petraselmer/followers","following_url":"https://api.github.com/users/petraselmer/following{/other_user}","gists_url":"https://api.github.com/users/petraselmer/gists{/gist_id}","starred_url":"https://api.github.com/users/petraselmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petraselmer/subscriptions","organizations_url":"https://api.github.com/users/petraselmer/orgs","repos_url":"https://api.github.com/users/petraselmer/repos","events_url":"https://api.github.com/users/petraselmer/events{/privacy}","received_events_url":"https://api.github.com/users/petraselmer/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-01T14:18:56Z","updated_at":"2018-08-06T16:16:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e50b76b702a3c946948b470a0be790d04e5ab28e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":671484292,"node_id":"MDU6TGFiZWw2NzE0ODQyOTI=","url":"https://api.github.com/repos/neo4j/neo4j-documentation/labels/3.3","name":"3.3","color":"FF7256","default":false},{"id":468723623,"node_id":"MDU6TGFiZWw0Njg3MjM2MjM=","url":"https://api.github.com/repos/neo4j/neo4j-documentation/labels/DO%20NOT%20MERGE","name":"DO NOT MERGE","color":"e11d21","default":false},{"id":468723435,"node_id":"MDU6TGFiZWw0Njg3MjM0MzU=","url":"https://api.github.com/repos/neo4j/neo4j-documentation/labels/cypher","name":"cypher","color":"5319e7","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239/commits","review_comments_url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239/comments","review_comment_url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/239/comments","statuses_url":"https://api.github.com/repos/neo4j/neo4j-documentation/statuses/307b56020a8912b4249df291448616ea4b9a84f3","head":{"label":"petraselmer:3.3-ExecutionPlan-Revamp","ref":"3.3-ExecutionPlan-Revamp","sha":"307b56020a8912b4249df291448616ea4b9a84f3","user":{"login":"petraselmer","id":9249759,"node_id":"MDQ6VXNlcjkyNDk3NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9249759?v=4","gravatar_id":"","url":"https://api.github.com/users/petraselmer","html_url":"https://github.com/petraselmer","followers_url":"https://api.github.com/users/petraselmer/followers","following_url":"https://api.github.com/users/petraselmer/following{/other_user}","gists_url":"https://api.github.com/users/petraselmer/gists{/gist_id}","starred_url":"https://api.github.com/users/petraselmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petraselmer/subscriptions","organizations_url":"https://api.github.com/users/petraselmer/orgs","repos_url":"https://api.github.com/users/petraselmer/repos","events_url":"https://api.github.com/users/petraselmer/events{/privacy}","received_events_url":"https://api.github.com/users/petraselmer/received_events","type":"User","site_admin":false},"repo":{"id":71873269,"node_id":"MDEwOlJlcG9zaXRvcnk3MTg3MzI2OQ==","name":"neo4j-documentation","full_name":"petraselmer/neo4j-documentation","owner":{"login":"petraselmer","id":9249759,"node_id":"MDQ6VXNlcjkyNDk3NTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9249759?v=4","gravatar_id":"","url":"https://api.github.com/users/petraselmer","html_url":"https://github.com/petraselmer","followers_url":"https://api.github.com/users/petraselmer/followers","following_url":"https://api.github.com/users/petraselmer/following{/other_user}","gists_url":"https://api.github.com/users/petraselmer/gists{/gist_id}","starred_url":"https://api.github.com/users/petraselmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petraselmer/subscriptions","organizations_url":"https://api.github.com/users/petraselmer/orgs","repos_url":"https://api.github.com/users/petraselmer/repos","events_url":"https://api.github.com/users/petraselmer/events{/privacy}","received_events_url":"https://api.github.com/users/petraselmer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petraselmer/neo4j-documentation","description":null,"fork":true,"url":"https://api.github.com/repos/petraselmer/neo4j-documentation","forks_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/forks","keys_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/teams","hooks_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/hooks","issue_events_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/events","assignees_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/tags","blobs_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/languages","stargazers_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/stargazers","contributors_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/contributors","subscribers_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/subscribers","subscription_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/subscription","commits_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/merges","archive_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/downloads","issues_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/labels{/name}","releases_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/releases{/id}","deployments_url":"https://api.github.com/repos/petraselmer/neo4j-documentation/deployments","created_at":"2016-10-25T07:58:02Z","updated_at":"2016-10-25T07:58:25Z","pushed_at":"2018-08-06T11:41:41Z","git_url":"git://github.com/petraselmer/neo4j-documentation.git","ssh_url":"git@github.com:petraselmer/neo4j-documentation.git","clone_url":"https://github.com/petraselmer/neo4j-documentation.git","svn_url":"https://github.com/petraselmer/neo4j-documentation","homepage":null,"size":217467,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"3.2"}},"base":{"label":"neo4j:3.3","ref":"3.3","sha":"e4c121d27fb47e4f57ee7193757672ece83548d1","user":{"login":"neo4j","id":201120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMTEyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/201120?v=4","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":71558013,"node_id":"MDEwOlJlcG9zaXRvcnk3MTU1ODAxMw==","name":"neo4j-documentation","full_name":"neo4j/neo4j-documentation","owner":{"login":"neo4j","id":201120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMTEyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/201120?v=4","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/neo4j-documentation","description":null,"fork":false,"url":"https://api.github.com/repos/neo4j/neo4j-documentation","forks_url":"https://api.github.com/repos/neo4j/neo4j-documentation/forks","keys_url":"https://api.github.com/repos/neo4j/neo4j-documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/neo4j-documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/neo4j-documentation/teams","hooks_url":"https://api.github.com/repos/neo4j/neo4j-documentation/hooks","issue_events_url":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/neo4j-documentation/events","assignees_url":"https://api.github.com/repos/neo4j/neo4j-documentation/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/neo4j-documentation/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/neo4j-documentation/tags","blobs_url":"https://api.github.com/repos/neo4j/neo4j-documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/neo4j-documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/neo4j-documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/neo4j-documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/neo4j-documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/neo4j-documentation/languages","stargazers_url":"https://api.github.com/repos/neo4j/neo4j-documentation/stargazers","contributors_url":"https://api.github.com/repos/neo4j/neo4j-documentation/contributors","subscribers_url":"https://api.github.com/repos/neo4j/neo4j-documentation/subscribers","subscription_url":"https://api.github.com/repos/neo4j/neo4j-documentation/subscription","commits_url":"https://api.github.com/repos/neo4j/neo4j-documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/neo4j-documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/neo4j-documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/neo4j-documentation/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/neo4j-documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/neo4j-documentation/merges","archive_url":"https://api.github.com/repos/neo4j/neo4j-documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/neo4j-documentation/downloads","issues_url":"https://api.github.com/repos/neo4j/neo4j-documentation/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/neo4j-documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/neo4j-documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/neo4j-documentation/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/neo4j-documentation/releases{/id}","deployments_url":"https://api.github.com/repos/neo4j/neo4j-documentation/deployments","created_at":"2016-10-21T11:05:53Z","updated_at":"2018-07-31T10:04:11Z","pushed_at":"2018-08-06T11:42:25Z","git_url":"git://github.com/neo4j/neo4j-documentation.git","ssh_url":"git@github.com:neo4j/neo4j-documentation.git","clone_url":"https://github.com/neo4j/neo4j-documentation.git","svn_url":"https://github.com/neo4j/neo4j-documentation","homepage":null,"size":217617,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":9,"license":null,"forks":41,"open_issues":9,"watchers":31,"default_branch":"3.5"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239"},"html":{"href":"https://github.com/neo4j/neo4j-documentation/pull/239"},"issue":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/239"},"comments":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/neo4j-documentation/statuses/307b56020a8912b4249df291448616ea4b9a84f3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"petraselmer"}}