pgsql: Fix cost estimates for EXISTS subqueries that are evaluated as - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix cost estimates for EXISTS subqueries that are evaluated as
Date
Msg-id 20070922213640.56A1C753E4C@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix cost estimates for EXISTS subqueries that are evaluated as initPlans
(because they are uncorrelated with the immediate parent query).  We were
charging the full run cost to the parent node, disregarding the fact that
only one row need be fetched for EXISTS.  While this would only be a
cosmetic issue in most cases, it might possibly affect planning outcomes
if the parent query were itself a subquery to some upper query.
Per recent discussion with Steve Crawford.

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.185 -> r1.186)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.185&r2=1.186)
    pgsql/src/backend/optimizer/plan:
        subselect.c (r1.124 -> r1.125)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.124&r2=1.125)
    pgsql/src/include/optimizer:
        cost.h (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/cost.h?r1=1.88&r2=1.89)

pgsql-committers by date:

Previous
From: adunstan@postgresql.org (Andrew Dunstan)
Date:
Subject: pgsql: Replace calls to external dir program with perlish globs and
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Document the translations from Postgres message severity levels