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

pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost
Date: 2007-05-22 01:40:42
Message-ID: 20070522014042.D1B5C9FB293@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix best_inner_indexscan to return both the cheapest-total-cost and
cheapest-startup-cost innerjoin indexscans, and make joinpath.c consider
both of these (when different) as the inside of a nestloop join.  The
original design was based on the assumption that indexscan paths always
have negligible startup cost, and so total cost is the only important
figure of merit; an assumption that's obviously broken by bitmap
indexscans.  This oversight could lead to choosing poor plans in cases
where fast-start behavior is more important than total cost, such as
LIMIT and IN queries.  8.1-vintage brain fade exposed by an example from
Chuck D.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/nodes:
        outfuncs.c (r1.285 -> r1.285.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/nodes/outfuncs.c.diff?r1=1.285&r2=1.285.2.1)
    pgsql/src/backend/optimizer/path:
        indxpath.c (r1.212.2.1 -> r1.212.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.212.2.1&r2=1.212.2.2)
        joinpath.c (r1.107 -> r1.107.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c.diff?r1=1.107&r2=1.107.2.1)
    pgsql/src/include/nodes:
        relation.h (r1.128.2.1 -> r1.128.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h.diff?r1=1.128.2.1&r2=1.128.2.2)
    pgsql/src/include/optimizer:
        paths.h (r1.93.2.1 -> r1.93.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/optimizer/paths.h.diff?r1=1.93.2.1&r2=1.93.2.2)

pgsql-committers by date

Next:From: Tom LaneDate: 2007-05-22 01:40:53
Subject: pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost
Previous:From: Tom LaneDate: 2007-05-22 01:40:33
Subject: pgsql: Fix best_inner_indexscan to return both the cheapest-total-cost

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