diff options
author | Tom Lane | 2001-05-09 23:13:37 +0000 |
---|---|---|
committer | Tom Lane | 2001-05-09 23:13:37 +0000 |
commit | c23bc6fbb02455ee9c2e0206747a929aa79b7d01 (patch) | |
tree | 798bf1a1cdfa4e5c9d2d5f50e951a8d49f04c74d /src/include | |
parent | e02033572d1a017e481b69c937e6618c4c2af234 (diff) |
First cut at making indexscan cost estimates depend on correlation
between index order and table order.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/pg_proc.h | 10 | ||||
-rw-r--r-- | src/include/optimizer/var.h | 4 | ||||
-rw-r--r-- | src/include/utils/lsyscache.h | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index d03d472043f..7d7acf96f73 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.184 2001/03/22 04:00:39 momjian Exp $ + * $Id: pg_proc.h,v 1.185 2001/05/09 23:13:35 tgl Exp $ * * NOTES * The script catalog/genbki.sh reads this file and generates .bki @@ -210,9 +210,9 @@ DESCR("not equal"); DATA(insert OID = 89 ( version PGUID 12 f t f t 0 f 25 "" 100 0 0 100 pgsql_version - )); DESCR("PostgreSQL version string"); -DATA(insert OID = 1265 ( rtcostestimate PGUID 12 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 rtcostestimate - )); +DATA(insert OID = 1265 ( rtcostestimate PGUID 12 f t f t 8 f 0 "0 0 0 0 0 0 0 0" 100 0 0 100 rtcostestimate - )); DESCR("r-tree cost estimator"); -DATA(insert OID = 1268 ( btcostestimate PGUID 12 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 btcostestimate - )); +DATA(insert OID = 1268 ( btcostestimate PGUID 12 f t f t 8 f 0 "0 0 0 0 0 0 0 0" 100 0 0 100 btcostestimate - )); DESCR("btree cost estimator"); /* OIDS 100 - 199 */ @@ -789,7 +789,7 @@ DESCR("convert name to char()"); DATA(insert OID = 409 ( name PGUID 12 f t t t 1 f 19 "1042" 100 0 0 100 bpchar_name - )); DESCR("convert char() to name"); -DATA(insert OID = 438 ( hashcostestimate PGUID 12 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 hashcostestimate - )); +DATA(insert OID = 438 ( hashcostestimate PGUID 12 f t f t 8 f 0 "0 0 0 0 0 0 0 0" 100 0 0 100 hashcostestimate - )); DESCR("hash index cost estimator"); DATA(insert OID = 440 ( hashgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 hashgettuple - )); @@ -1014,7 +1014,7 @@ DESCR("larger of two"); DATA(insert OID = 771 ( int2smaller PGUID 12 f t t t 2 f 21 "21 21" 100 0 0 100 int2smaller - )); DESCR("smaller of two"); -DATA(insert OID = 772 ( gistcostestimate PGUID 12 f t f t 7 f 0 "0 0 0 0 0 0 0" 100 0 0 100 gistcostestimate - )); +DATA(insert OID = 772 ( gistcostestimate PGUID 12 f t f t 8 f 0 "0 0 0 0 0 0 0 0" 100 0 0 100 gistcostestimate - )); DESCR("gist cost estimator"); DATA(insert OID = 774 ( gistgettuple PGUID 12 f t f t 2 f 23 "0 0" 100 0 0 100 gistgettuple - )); DESCR("gist(internal)"); diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index 45048133eb0..4cad677c7ce 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: var.h,v 1.13 2001/04/18 20:42:55 tgl Exp $ + * $Id: var.h,v 1.14 2001/05/09 23:13:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -17,6 +17,8 @@ #include "nodes/primnodes.h" extern List *pull_varnos(Node *node); +extern bool contain_var_reference(Node *node, int varno, int varattno, + int levelsup); extern bool contain_whole_tuple_var(Node *node, int varno, int levelsup); extern bool contain_var_clause(Node *node); extern List *pull_var_clause(Node *node, bool includeUpperVars); diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 3f18a4aea63..719f68a873f 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.32 2001/05/09 00:35:09 tgl Exp $ + * $Id: lsyscache.h,v 1.33 2001/05/09 23:13:37 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,8 @@ extern AttrNumber get_attnum(Oid relid, char *attname); extern Oid get_atttype(Oid relid, AttrNumber attnum); extern bool get_attisset(Oid relid, char *attname); extern int32 get_atttypmod(Oid relid, AttrNumber attnum); +extern void get_atttypetypmod(Oid relid, AttrNumber attnum, + Oid *typid, int32 *typmod); extern RegProcedure get_opcode(Oid opno); extern char *get_opname(Oid opno); extern bool op_mergejoinable(Oid opno, Oid ltype, Oid rtype, |