diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-18 22:44:35 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-18 22:44:35 +0000 |
commit | 1ee26b776475155ad1fb00fa3ed0a93659ffadad (patch) | |
tree | 1f2c7a59a1fdf3fe3eb62cf5044c5c6c21f77d12 /src/backend/optimizer/util | |
parent | 2c0edb3c8677831d836fc44eb58ebecb73f747af (diff) | |
download | postgresql-1ee26b776475155ad1fb00fa3ed0a93659ffadad.tar.gz postgresql-1ee26b776475155ad1fb00fa3ed0a93659ffadad.zip |
Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the
materialized tupleset is small enough) instead of a temporary relation.
This was something I was thinking of doing anyway for performance, and Jan
says he needs it for TOAST because he doesn't want to cope with toasting
noname relations. With this change, the 'noname table' support in heap.c
is dead code, and I have accordingly removed it. Also clean up 'noname'
plan handling in planner --- nonames are either sort or materialize plans,
and it seems less confusing to handle them separately under those names.
Diffstat (limited to 'src/backend/optimizer/util')
-rw-r--r-- | src/backend/optimizer/util/relnode.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index da7059ce915..070fabf7669 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -8,14 +8,13 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.26 2000/04/12 17:15:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.27 2000/06/18 22:44:12 tgl Exp $ * *------------------------------------------------------------------------- */ #include "postgres.h" #include "optimizer/cost.h" -#include "optimizer/internal.h" #include "optimizer/joininfo.h" #include "optimizer/pathnode.h" #include "optimizer/plancat.h" @@ -76,26 +75,9 @@ get_base_rel(Query *root, int relid) rel->joininfo = NIL; rel->innerjoin = NIL; - if (relid < 0) - { - - /* - * If the relation is a materialized relation, assume constants - * for sizes. - */ - rel->pages = _NONAME_RELATION_PAGES_; - rel->tuples = _NONAME_RELATION_TUPLES_; - } - else - { - - /* - * Otherwise, retrieve relation statistics from the system - * catalogs. - */ - relation_info(root, relid, - &rel->indexed, &rel->pages, &rel->tuples); - } + /* Retrieve relation statistics from the system catalogs. */ + relation_info(root, relid, + &rel->indexed, &rel->pages, &rel->tuples); root->base_rel_list = lcons(rel, root->base_rel_list); |