Skip site navigation (1) Skip section navigation (2)

pgsql: Rewrite the planner's handling of materialized plan types so that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rewrite the planner's handling of materialized plan types so that
Date: 2009-09-12 22:12:09
Message-ID: 20090912221209.8E3E7753FB7@cvs.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Rewrite the planner's handling of materialized plan types so that there is
an explicit model of rescan costs being different from first-time costs.
The costing of Material nodes in particular now has some visible relationship
to the actual runtime behavior, where before it was essentially fantasy.
This also fixes up a couple of places where different materialized plan types
were treated differently for no very good reason (probably just oversights).

A couple of the regression tests are affected, because the planner now chooses
to put the other relation on the inside of a nestloop-with-materialize.
So far as I can see both changes are sane, and the planner is now more
consistently following the expectation that it should prefer to materialize
the smaller of two relations.

Per a recent discussion with Robert Haas.

Modified Files:
--------------
    pgsql/src/backend/executor:
        execAmi.c (r1.103 -> r1.104)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execAmi.c?r1=1.103&r2=1.104)
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.210 -> r1.211)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.210&r2=1.211)
        joinpath.c (r1.122 -> r1.123)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c?r1=1.122&r2=1.123)
    pgsql/src/backend/optimizer/plan:
        createplan.c (r1.261 -> r1.262)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.261&r2=1.262)
        subselect.c (r1.152 -> r1.153)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.152&r2=1.153)
    pgsql/src/backend/optimizer/util:
        pathnode.c (r1.152 -> r1.153)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c?r1=1.152&r2=1.153)
    pgsql/src/include/executor:
        executor.h (r1.158 -> r1.159)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/executor/executor.h?r1=1.158&r2=1.159)
    pgsql/src/include/optimizer:
        cost.h (r1.97 -> r1.98)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h?r1=1.97&r2=1.98)
    pgsql/src/test/regress/expected:
        geometry.out (r1.26 -> r1.27)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry.out?r1=1.26&r2=1.27)
        geometry_1.out (r1.11 -> r1.12)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_1.out?r1=1.11&r2=1.12)
        geometry_2.out (r1.8 -> r1.9)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/geometry_2.out?r1=1.8&r2=1.9)
        join.out (r1.40 -> r1.41)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out?r1=1.40&r2=1.41)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2009-09-12 22:13:12
Subject: pgsql: Add Unicode support in PL/Python PL/Python now accepts Unicode
Previous:From: Stephen FrostDate: 2009-09-12 20:39:06
Subject: Re: Re: [COMMITTERS] Can not create more than 32766databases in ufs file system.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group