You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@age.apache.org by gi...@apache.org on 2022/10/14 03:44:50 UTC

[age-website] branch asf-staging updated: deploy: ddb6e2546ad062725fa0720f3d81cd7a3a1f522a

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/age-website.git


The following commit(s) were added to refs/heads/asf-staging by this push:
     new 49d22ce  deploy: ddb6e2546ad062725fa0720f3d81cd7a3a1f522a
49d22ce is described below

commit 49d22ce4303d5ebe3a24a8f821675da44fc48c73
Author: JoshInnis <Jo...@users.noreply.github.com>
AuthorDate: Fri Oct 14 03:44:46 2022 +0000

    deploy: ddb6e2546ad062725fa0720f3d81cd7a3a1f522a
---
 age-dev-manual/.doctrees/environment.pickle        | Bin 14196 -> 17251 bytes
 age-dev-manual/.doctrees/index.doctree             | Bin 2815 -> 3040 bytes
 .../.doctrees/postgres/query_processing.doctree    | Bin 0 -> 11647 bytes
 age-dev-manual/_sources/index.rst.txt              |   7 +
 .../_sources/postgres/query_processing.md.txt      |  39 ++++++
 age-dev-manual/genindex.html                       |   4 +
 age-dev-manual/intro/overview.html                 |   6 +
 age-dev-manual/objects.inv                         | Bin 274 -> 313 bytes
 age-dev-manual/postgres/query_processing.html      | 146 +++++++++++++++++++++
 age-dev-manual/search.html                         |   4 +
 age-dev-manual/searchindex.js                      |   2 +-
 11 files changed, 207 insertions(+), 1 deletion(-)

diff --git a/age-dev-manual/.doctrees/environment.pickle b/age-dev-manual/.doctrees/environment.pickle
index b84ff12..9f446cd 100644
Binary files a/age-dev-manual/.doctrees/environment.pickle and b/age-dev-manual/.doctrees/environment.pickle differ
diff --git a/age-dev-manual/.doctrees/index.doctree b/age-dev-manual/.doctrees/index.doctree
index e3c8c69..8980162 100644
Binary files a/age-dev-manual/.doctrees/index.doctree and b/age-dev-manual/.doctrees/index.doctree differ
diff --git a/age-dev-manual/.doctrees/postgres/query_processing.doctree b/age-dev-manual/.doctrees/postgres/query_processing.doctree
new file mode 100644
index 0000000..5fe998e
Binary files /dev/null and b/age-dev-manual/.doctrees/postgres/query_processing.doctree differ
diff --git a/age-dev-manual/_sources/index.rst.txt b/age-dev-manual/_sources/index.rst.txt
index a9444e0..4650d67 100644
--- a/age-dev-manual/_sources/index.rst.txt
+++ b/age-dev-manual/_sources/index.rst.txt
@@ -7,3 +7,10 @@ Apache AGE's documentation
    :maxdepth: 1
 
    intro/overview
+
+
+.. toctree::                                                                     
+   :caption: Postgres Internals                                                     
+   :maxdepth: 1                                                                  
+                                                                                 
+   postgres/query_processing 
diff --git a/age-dev-manual/_sources/postgres/query_processing.md.txt b/age-dev-manual/_sources/postgres/query_processing.md.txt
new file mode 100644
index 0000000..e281fae
--- /dev/null
+++ b/age-dev-manual/_sources/postgres/query_processing.md.txt
@@ -0,0 +1,39 @@
+# Postgres Query Processing Stages
+
+## Overview
+
+When a query is submitted to Postgres, the server will process the query in 5 stages.
+
+<img src='https://www.interdb.jp/pg/img/fig-3-01.png'>
+
+
+## Parsing
+
+The first stages is the parser stage. The purpose of this stage in to transform the query given to postgres from a string to adata structure that the rest of the system can understand. 
+
+Commonly known as an <a src='https://en.wikipedia.org/wiki/Abstract_syntax_tree'>abstract syntax tree (AST)</a> this data structed will then be passed to the rest of the system for processing. This stage does no interpretation of the query and only creates the AST and verifies that the user provided a syntatically correct query.
+
+The core of the postgres phase is it's <a src='https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y'>grammar file.</a>
+
+## Transform/Analyzer
+
+Once the parser stage is complete, the analyze phase will start. The goal of this stage is to interpret what the query is trying to do. What tables are being used, is the query a SELECT, INSERT, UPDATE, or DELETE, what data the user wants returned, etc.
+
+The core of the transform phase is <a src='https://github.com/postgres/postgres/blob/master/src/backend/parser/analyze.c'>src/backend/parser/analyze.c</a>. 
+
+## Optimizer/Planner
+
+The optimizer/planner can be considered two or possibly three phases combined into one.
+
+Once Postgres has figured out what the query wants to do, there is a phase where Postgres tries to optimize the query. 
+
+A given SQL query can be actually executed in a wide variety of different ways, each of which will produce the same set of results. If it is computationally feasible, the query optimizer will examine each of these possible execution plans, ultimately selecting the execution plan that is expected to run the fastest.
+
+The entry point into the optimizer/planner is <a src='https://github.com/postgres/postgres/blob/master/src/backend/optimizer/plan/planner.c#L270'>here.</a>
+
+## Execution
+
+The final stage is when the query is actually executed. Once postgres has created a plan for how to execute the query, this stage will take the query and execute it.
+
+The entry point for the execution phase is <a src='https://github.com/postgres/postgres/blob/master/src/backend/executor/execMain.c'>here.</a>
+
diff --git a/age-dev-manual/genindex.html b/age-dev-manual/genindex.html
index 009ff61..96c93cf 100644
--- a/age-dev-manual/genindex.html
+++ b/age-dev-manual/genindex.html
@@ -42,6 +42,10 @@
               <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="intro/overview.html">Overview</a></li>
+</ul>
+<p class="caption" role="heading"><span class="caption-text">Postgres Internals</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="postgres/query_processing.html">Postgres Query Processing Stages</a></li>
 </ul>
 
         </div>
diff --git a/age-dev-manual/intro/overview.html b/age-dev-manual/intro/overview.html
index 125fcfe..25343be 100644
--- a/age-dev-manual/intro/overview.html
+++ b/age-dev-manual/intro/overview.html
@@ -22,6 +22,7 @@
     <script src="../_static/js/theme.js"></script>
     <link rel="index" title="Index" href="../genindex.html" />
     <link rel="search" title="Search" href="../search.html" />
+    <link rel="next" title="Postgres Query Processing Stages" href="../postgres/query_processing.html" />
     <link rel="prev" title="Apache AGE’s documentation" href="../index.html" /> 
 </head>
 
@@ -44,6 +45,10 @@
               <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
 <ul class="current">
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Overview</a></li>
+</ul>
+<p class="caption" role="heading"><span class="caption-text">Postgres Internals</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../postgres/query_processing.html">Postgres Query Processing Stages</a></li>
 </ul>
 
         </div>
@@ -80,6 +85,7 @@
           </div>
           <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
         <a href="../index.html" class="btn btn-neutral float-left" title="Apache AGE’s documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+        <a href="../postgres/query_processing.html" class="btn btn-neutral float-right" title="Postgres Query Processing Stages" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
     </div>
 
   <hr/>
diff --git a/age-dev-manual/objects.inv b/age-dev-manual/objects.inv
index 593cf03..af909fe 100644
Binary files a/age-dev-manual/objects.inv and b/age-dev-manual/objects.inv differ
diff --git a/age-dev-manual/postgres/query_processing.html b/age-dev-manual/postgres/query_processing.html
new file mode 100644
index 0000000..922f133
--- /dev/null
+++ b/age-dev-manual/postgres/query_processing.html
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html class="writer-html5" lang="en" >
+<head>
+  <meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
+
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+  <title>Postgres Query Processing Stages &mdash; Apache AGE master documentation</title>
+      <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+      <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
+      <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
+    <link rel="shortcut icon" href="../_static/favicon.ico"/>
+  <!--[if lt IE 9]>
+    <script src="../_static/js/html5shiv.min.js"></script>
+  <![endif]-->
+  
+        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
+        <script src="../_static/jquery.js"></script>
+        <script src="../_static/underscore.js"></script>
+        <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
+        <script src="../_static/doctools.js"></script>
+        <script src="../_static/sphinx_highlight.js"></script>
+    <script src="../_static/js/theme.js"></script>
+    <link rel="index" title="Index" href="../genindex.html" />
+    <link rel="search" title="Search" href="../search.html" />
+    <link rel="prev" title="Overview" href="../intro/overview.html" /> 
+</head>
+
+<body class="wy-body-for-nav"> 
+  <div class="wy-grid-for-nav">
+    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+      <div class="wy-side-scroll">
+        <div class="wy-side-nav-search" >
+            <a href="../index.html" class="icon icon-home"> Apache AGE
+            <img src="../_static/logo.png" class="logo" alt="Logo"/>
+          </a>
+<div role="search">
+  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
+    <input type="text" name="q" placeholder="Search docs" />
+    <input type="hidden" name="check_keywords" value="yes" />
+    <input type="hidden" name="area" value="default" />
+  </form>
+</div>
+        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
+              <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="../intro/overview.html">Overview</a></li>
+</ul>
+<p class="caption" role="heading"><span class="caption-text">Postgres Internals</span></p>
+<ul class="current">
+<li class="toctree-l1 current"><a class="current reference internal" href="#">Postgres Query Processing Stages</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#overview">Overview</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#parsing">Parsing</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#transform-analyzer">Transform/Analyzer</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#optimizer-planner">Optimizer/Planner</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#execution">Execution</a></li>
+</ul>
+</li>
+</ul>
+
+        </div>
+      </div>
+    </nav>
+
+    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
+          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+          <a href="../index.html">Apache AGE</a>
+      </nav>
+
+      <div class="wy-nav-content">
+        <div class="rst-content">
+          <div role="navigation" aria-label="Page navigation">
+  <ul class="wy-breadcrumbs">
+      <li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
+      <li>Postgres Query Processing Stages</li>
+      <li class="wy-breadcrumbs-aside">
+              <a href="https://github.com/apache/age-website/blob/master/docs/postgres/query_processing.md" class="fa fa-github"> Edit on GitHub</a>
+      </li>
+  </ul>
+  <hr/>
+</div>
+          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+           <div itemprop="articleBody">
+             
+  <section id="postgres-query-processing-stages">
+<h1>Postgres Query Processing Stages<a class="headerlink" href="#postgres-query-processing-stages" title="Permalink to this heading"></a></h1>
+<section id="overview">
+<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h2>
+<p>When a query is submitted to Postgres, the server will process the query in 5 stages.</p>
+<img src='https://www.interdb.jp/pg/img/fig-3-01.png'>
+</section>
+<section id="parsing">
+<h2>Parsing<a class="headerlink" href="#parsing" title="Permalink to this heading"></a></h2>
+<p>The first stages is the parser stage. The purpose of this stage in to transform the query given to postgres from a string to adata structure that the rest of the system can understand.</p>
+<p>Commonly known as an <a src='https://en.wikipedia.org/wiki/Abstract_syntax_tree'>abstract syntax tree (AST)</a> this data structed will then be passed to the rest of the system for processing. This stage does no interpretation of the query and only creates the AST and verifies that the user provided a syntatically correct query.</p>
+<p>The core of the postgres phase is it’s <a src='https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y'>grammar file.</a></p>
+</section>
+<section id="transform-analyzer">
+<h2>Transform/Analyzer<a class="headerlink" href="#transform-analyzer" title="Permalink to this heading"></a></h2>
+<p>Once the parser stage is complete, the analyze phase will start. The goal of this stage is to interpret what the query is trying to do. What tables are being used, is the query a SELECT, INSERT, UPDATE, or DELETE, what data the user wants returned, etc.</p>
+<p>The core of the transform phase is <a src='https://github.com/postgres/postgres/blob/master/src/backend/parser/analyze.c'>src/backend/parser/analyze.c</a>.</p>
+</section>
+<section id="optimizer-planner">
+<h2>Optimizer/Planner<a class="headerlink" href="#optimizer-planner" title="Permalink to this heading"></a></h2>
+<p>The optimizer/planner can be considered two or possibly three phases combined into one.</p>
+<p>Once Postgres has figured out what the query wants to do, there is a phase where Postgres tries to optimize the query.</p>
+<p>A given SQL query can be actually executed in a wide variety of different ways, each of which will produce the same set of results. If it is computationally feasible, the query optimizer will examine each of these possible execution plans, ultimately selecting the execution plan that is expected to run the fastest.</p>
+<p>The entry point into the optimizer/planner is <a src='https://github.com/postgres/postgres/blob/master/src/backend/optimizer/plan/planner.c#L270'>here.</a></p>
+</section>
+<section id="execution">
+<h2>Execution<a class="headerlink" href="#execution" title="Permalink to this heading"></a></h2>
+<p>The final stage is when the query is actually executed. Once postgres has created a plan for how to execute the query, this stage will take the query and execute it.</p>
+<p>The entry point for the execution phase is <a src='https://github.com/postgres/postgres/blob/master/src/backend/executor/execMain.c'>here.</a></p>
+</section>
+</section>
+
+
+           </div>
+          </div>
+          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
+        <a href="../intro/overview.html" class="btn btn-neutral float-left" title="Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+    </div>
+
+  <hr/>
+
+  <div role="contentinfo">
+    <p>&#169; Copyright 2021, Apache AGE.</p>
+  </div>
+
+  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
+    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
+    provided by <a href="https://readthedocs.org">Read the Docs</a>.
+   
+
+</footer>
+        </div>
+      </div>
+    </section>
+  </div>
+  <script>
+      jQuery(function () {
+          SphinxRtdTheme.Navigation.enable(true);
+      });
+  </script> 
+
+</body>
+</html>
\ No newline at end of file
diff --git a/age-dev-manual/search.html b/age-dev-manual/search.html
index a1a8f17..61f6959 100644
--- a/age-dev-manual/search.html
+++ b/age-dev-manual/search.html
@@ -45,6 +45,10 @@
               <p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="intro/overview.html">Overview</a></li>
+</ul>
+<p class="caption" role="heading"><span class="caption-text">Postgres Internals</span></p>
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="postgres/query_processing.html">Postgres Query Processing Stages</a></li>
 </ul>
 
         </div>
diff --git a/age-dev-manual/searchindex.js b/age-dev-manual/searchindex.js
index bbac58f..7b6e195 100644
--- a/age-dev-manual/searchindex.js
+++ b/age-dev-manual/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["index", "intro/overview"], "filenames": ["index.rst", "intro/overview.md"], "titles": ["Apache AGE\u2019s documentation", "Overview"], "terms": {"overview": 0, "The": 1, "i": 1, "develop": 1, "manual": 1, "apach": 1, "ag": 1, "instruct": 1, "how": 1, "help": 1, "can": 1, "found": 1, "here": 1, "detail": 1, "both": 1, "postgr": 1, "work": 1}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"apach": 0, "ag": 0, "": 0, "document": 0, "introduct": [...]
\ No newline at end of file
+Search.setIndex({"docnames": ["index", "intro/overview", "postgres/query_processing"], "filenames": ["index.rst", "intro/overview.md", "postgres/query_processing.md"], "titles": ["Apache AGE\u2019s documentation", "Overview", "Postgres Query Processing Stages"], "terms": {"overview": 0, "queri": 0, "process": 0, "stage": 0, "The": [1, 2], "i": [1, 2], "develop": 1, "manual": 1, "apach": 1, "ag": 1, "instruct": 1, "how": [1, 2], "help": 1, "can": [1, 2], "found": 1, "here": [1, 2], "detai [...]
\ No newline at end of file