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
9188aab7
Commit
9188aab7
authored
Feb 20, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pathkeys description.
parent
67fd67f5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/path/pathkeys.c
+24
-2
src/include/nodes/relation.h
src/include/nodes/relation.h
+5
-4
No files found.
src/backend/optimizer/path/pathkeys.c
View file @
9188aab7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.
1 1999/02/20 15:27:42
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.
2 1999/02/20 16:28:20
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include "optimizer/joininfo.h"
#include "optimizer/joininfo.h"
#include "optimizer/ordering.h"
#include "optimizer/ordering.h"
static
int
match_pathkey_joinkeys
(
List
*
pathkey
,
List
*
joinkeys
,
static
int
match_pathkey_joinkeys
(
List
*
pathkey
,
List
*
joinkeys
,
int
outer_or_inner
);
int
outer_or_inner
);
static
bool
joinkeys_pathkeys_match
(
List
*
joinkeys
,
List
*
pathkey
,
static
bool
joinkeys_pathkeys_match
(
List
*
joinkeys
,
List
*
pathkey
,
...
@@ -35,6 +34,29 @@ static List *new_join_pathkey(List *subkeys, List *considered_subkeys,
...
@@ -35,6 +34,29 @@ static List *new_join_pathkey(List *subkeys, List *considered_subkeys,
static
List
*
new_matching_subkeys
(
Var
*
subkey
,
List
*
considered_subkeys
,
static
List
*
new_matching_subkeys
(
Var
*
subkey
,
List
*
considered_subkeys
,
List
*
join_rel_tlist
,
List
*
joinclauses
);
List
*
join_rel_tlist
,
List
*
joinclauses
);
/*
* Explanation of Path.pathkeys
*
* This structure is a List of List of Var nodes that represent the sort
* order of the result generated by the Path.
*
* In single/base relation RelOptInfo's, the Path's represent various ways
* of generate the relation. Sequential scan Paths have a NIL pathkeys.
* Index scans have Path.pathkeys that represent the chosen index. A
* single-key index pathkeys would be { {tab1_indexkey1} }. The pathkeys
* entry for a multi-key index would be { {tab1_indexkey1}, {tab1_indexkey2} }.
*
* Multi-relation RelOptInfo Path's are more complicated. Mergejoins are
* only performed with equajoins("="). Because of this, the multi-relation
* path actually has more than one ordering. For example, a mergejoin Path
* of "tab1.col1 = tab2.col1" would generate a pathkeys of
* { {tab1.col1, tab2.col1} }. This allows future joins to use either Var
* as a pre-sorted key to prevent Mergejoins from having to re-sort the Path.
* They are equal, so they are both primary sort keys. This is why pathkeys
* is a List of Lists.
*/
/****************************************************************************
/****************************************************************************
* KEY COMPARISONS
* KEY COMPARISONS
****************************************************************************/
****************************************************************************/
...
...
src/include/nodes/relation.h
View file @
9188aab7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: relation.h,v 1.2
6 1999/02/18 00:49:38
momjian Exp $
* $Id: relation.h,v 1.2
7 1999/02/20 16:28:20
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -142,9 +142,10 @@ typedef struct Path
...
@@ -142,9 +142,10 @@ typedef struct Path
PathOrder
*
pathorder
;
PathOrder
*
pathorder
;
List
*
pathkeys
;
/* This is a List of List of Var nodes.
List
*
pathkeys
;
/*
* It is a List of Lists because of multi-key
* This is a List of List of Var nodes.
* indexes.
* See the top of optimizer/path/pathkeys.c
* for more information.
*/
*/
Cost
outerjoincost
;
Cost
outerjoincost
;
Relids
joinid
;
Relids
joinid
;
...
...
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