Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8986e609
Commit
8986e609
authored
Jun 28, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update flowchart and backend descriptions.
parent
0cba5523
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
+27
-21
src/tools/backend/index.html
src/tools/backend/index.html
+27
-21
No files found.
src/tools/backend/index.html
View file @
8986e609
...
@@ -32,35 +32,35 @@ The parser takes the complex queries, and creates a
...
@@ -32,35 +32,35 @@ The parser takes the complex queries, and creates a
<A
HREF=
"../../include/nodes/parsenodes.h"
>
Query
</A>
structure that
<A
HREF=
"../../include/nodes/parsenodes.h"
>
Query
</A>
structure that
contains all the elements used by complex queries. Query.qual holds the
contains all the elements used by complex queries. Query.qual holds the
WHERE clause qualification, which is filled in by
WHERE clause qualification, which is filled in by
<A
HREF=
"../../backend/parser/parse_clause.c"
>
transformWhereClause().
</A>
<A
HREF=
"../../backend/parser/parse_clause.c"
>
transformWhereClause().
</A>
Each table
is represented by a
<A
HREF=
"../../include/nodes/parsenodes.h"
>
Each table
referenced in the query is represented by a
<A
RangeTableEntry,
</A>
HREF=
"../../include/nodes/parsenodes.h"
>
RangeTableEntry,
</A>
and they
a
nd they are linked together to form the
<I>
range table
</I>
for the
a
re linked together to form the
<I>
range table
</I>
of the query, which is
query, and is
generated by
<A
HREF=
"../../backend/parser/parse_clause.c"
>
generated by
<A
HREF=
"../../backend/parser/parse_clause.c"
>
makeRangeTable().
</A>
Query.rtable holds the queries range table.
makeRangeTable().
</A>
Query.rtable holds the queries range table.
<P>
<P>
Certain queries, like SELECT, return columns of data. Other queries,
Certain queries, like SELECT, return columns of data. Other queries,
like INSERT and UPDATE, specify the columns modified by the query.
like INSERT and UPDATE, specify the columns modified by the query.
These column
s
references are converted to
<A
These column references are converted to
<A
HREF=
"../../include/nodes/primnodes.h"
>
Resdom
</A>
entries, which are
HREF=
"../../include/nodes/primnodes.h"
>
Resdom
</A>
entries, which are
linked together to make up the
<I>
target list
</I>
of the query. The
linked together to make up the
<I>
target list
</I>
of the query. The
target list is stored in Query.targetList,
and
is generated by
target list is stored in Query.targetList,
which
is generated by
<A
HREF=
"../../backend/parser/parse_target.c"
>
transformTargetList().
</A>
<A
HREF=
"../../backend/parser/parse_target.c"
>
transformTargetList().
</A>
<P>
<P>
Other query elements, like aggregates(SUM()), GROUP BY, ORDER BY are
Other query elements, like aggregates(SUM()), GROUP BY, ORDER BY are
also stored in their own fields.
also stored in their own
Query
fields.
<P>
<P>
The next step is for the Query to be modified by any VIEWS or RULES that
The next step is for the Query to be modified by any VIEWS or RULES that
may apply to the query. This is performed by the
<A
may apply to the query. This is performed by the
<A
HREF=
"../../backend/rewrite"
>
rewrite
</A>
system.
HREF=
"../../backend/rewrite"
>
rewrite
</A>
system.
<P>
<P>
The optimizer takes the Query structure, and generates an optimal
The
<A
HREF=
"../../backend/optimizer"
>
optimizer
</A>
takes the Query
<A
HREF=
"../..//include/nodes/plannodes.h"
>
Plan
</A>
containing primitive
structure, and generates an optimal
operations to be performed by the executor to complete the query. The
<A
HREF=
"../..//include/nodes/plannodes.h"
>
Plan
</A>
containing the
<A
HREF=
"../../backend/optimizer/path"
>
path
</A>
module
primitive operations to be performed by the executor to execute the
determines the table join order and join type of each of the tables in
query. The
<A
HREF=
"../../backend/optimizer/path"
>
path
</A>
module
the RangeTable, using Query.qual(WHERE clause) to consider optimal index
determines the best table join order and join type of each table in the
RangeTable, using Query.qual(WHERE clause) to consider optimal index
usage.
usage.
<P>
<P>
The Plan is then passed to the
<A
The Plan is then passed to the
<A
...
@@ -76,21 +76,27 @@ table data/index blocks, locks, and backend information:
...
@@ -76,21 +76,27 @@ table data/index blocks, locks, and backend information:
<LI>
ShmemIndex - contains an index of all other shared memory
<LI>
ShmemIndex - contains an index of all other shared memory
structures, allowing quick lookup of other structure locations in shared
structures, allowing quick lookup of other structure locations in shared
memory
memory
<LI>
Buffer Descriptors - control header for shared memory buffer block
<LI><A
HREF=
"../../include/storage/buf_internals.h"
>
Buffer
<LI>
Buffer Blocks - block of table/index data shared by all backends
Descriptors
</A>
- control header for shared memory buffer block
<LI><A
HREF=
"../../include/storage/buf_internals.h"
>
Buffer Blocks
</A>
- block of table/index data shared by all backends
<LI>
Shared Buf Lookup Table - lookup to see if a requested buffer
<LI>
Shared Buf Lookup Table - lookup to see if a requested buffer
is already in the shared memory area
is already in the shared memory area
<LI>
LockTable - lock table structure, specifiying table, lock types, and
<LI><A
HREF=
"../../include/storage/lock.h"
>
LockTable
</A>
- lock table structure, specifiying table, lock types, and
backends holding or waiting on lock
backends holding or waiting on lock
<LI>
LockTable (lock hash) - lookup of LockTable structures using
<LI>
LockTable (lock hash) - lookup of LockTable structures using
table name
table name
<LI>
LockTable (xid hash) - lookup of LockTable structures using
<LI>
LockTable (xid hash) - lookup of LockTable structures using
transaction id
transaction id
<LI>
Proc Header - information about each backend, including locks held/waiting,
<LI>
<A
HREF=
"../../include/storage/proc.h"
>
Proc Header
</A>
- information
indexed by process id
about each backend, including locks held/waiting,
indexed by process id
</UL>
</UL>
Each structure is created by calling
<A
Each data structure is created by calling
<A
HREF=
"../../backend/storage/ipc/shmem.c"
>
ShmemInitStruct().
</A>
HREF=
"../../backend/storage/ipc/shmem.c"
>
ShmemInitStruct(),
</A>
and
the lookup hashes are created by
<A
HREF=
"../../backend/storage/ipc/shmem.c"
>
ShmemInitHash().
</A>
<HR>
<HR>
<CENTER>
<CENTER>
<EM><BIG>
<EM><BIG>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment