Re: Partial index on date column - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Partial index on date column
Date
Msg-id 27669.1047012255@sss.pgh.pa.us
Whole thread Raw
In response to Re: Partial index on date column  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Obviously to you and I, referrer=1 implies that referrer is not null, but
> the planner doesn't know that.

Actually the planner does make exactly that deduction in some other
contexts --- but I'm hesitant to expend the cycles for partial indexes.
Partial-index condition matching is a horribly difficult problem in
general, and we only attempt a few limited cases right now.  I don't
think we want to put a general-purpose theorem prover in there ---
so it comes down to the likelihood of spotting a match in some cases,
versus the wasted cycles of checking for a match in every query that
doesn't fit the pattern.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bad crash, pg_clog files missing ... ?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Bad crash, pg_clog files missing ... ?