pgsql: Arrange to cache the results of looking up a btree predicate - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Arrange to cache the results of looking up a btree predicate
Date
Msg-id 20081113002045.AB8F27545A4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Arrange to cache the results of looking up a btree predicate proof comparison
operator.  The result depends only on the two input operators and the proof
direction (imply or refute), so it's easy to cache.  This provides a very
large savings in cases such as Sergey Konoplev's long NOT-IN-list example,
where predtest spends all its time repeatedly figuring out that the same pair
of operators cannot be used to prove anything.  (But of course the O(N^2)
behavior still catches up with you eventually.)  I'm not convinced it buys
a whole lot when constraint_exclusion isn't turned on, but it's not a lot
of added code so we might as well cache all the time.

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        predtest.c (r1.21 -> r1.22)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/predtest.c?r1=1.21&r2=1.22)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: In predtest.c, install a limit on the number of branches we will
Next
From: itagaki@pgfoundry.org (User Itagaki)
Date:
Subject: orafce - orafce: Cleanup white spaces and indentations.