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

pgsql: Fix some planner bugs exposed by reports from Arjen van der

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix some planner bugs exposed by reports from Arjen van der
Date: 2006-12-15 18:42:35
Message-ID: 20061215184235.7DF309F9FB2@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix some planner bugs exposed by reports from Arjen van der Meijden.  These
are all in new-in-8.2 logic associated with indexability of ScalarArrayOpExpr
(IN-clauses) or amortization of indexscan costs across repeated indexscans
on the inside of a nestloop.  In particular:

Fix some logic errors in the estimation for multiple scans induced by a
ScalarArrayOpExpr indexqual.

Include a small cost component in bitmap index scans to reflect the costs of
manipulating the bitmap itself; this is mainly to prevent a bitmap scan from
appearing to have the same cost as a plain indexscan for fetching a single
tuple.

Also add a per-index-scan-startup CPU cost component; while prior releases
were clearly too pessimistic about the cost of repeated indexscans, the
original 8.2 coding allowed the cost of an indexscan to effectively go to zero
if repeated often enough, which is overly optimistic.

Pay some attention to index correlation when estimating costs for a nestloop
inner indexscan: this is significant when the plan fetches multiple heap
tuples per iteration, since high correlation means those tuples are probably
on the same or adjacent heap pages.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        costsize.c (r1.169 -> r1.169.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c.diff?r1=1.169&r2=1.169.2.1)
    pgsql/src/backend/utils/adt:
        selfuncs.c (r1.214 -> r1.214.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c.diff?r1=1.214&r2=1.214.2.1)

pgsql-committers by date

Next:From: Andrew DunstanDate: 2006-12-16 00:38:44
Subject: pgsql: enable \timing oputput for \copy commands
Previous:From: Tom LaneDate: 2006-12-15 18:42:26
Subject: pgsql: Fix some planner bugs exposed by reports from Arjen van der

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