From: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Partial index on date column |
Date: | 2003-03-07 05:28:49 |
Message-ID: | 02bf01c2e46a$70c17c70$6500a8c0@fhp.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)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.
Yeah, it's not really a problem for me, I just put the extra clause in.
Is indexing excluding NULLs a common application of partial indexes? It's
basically all I use it for, when a column has like 90-95% NULLS and I want
to exclude them from the index. Is it worth hard-coding in the IS NOT NULL
case?
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-03-07 05:36:21 | Re: Brain dump: btree collapsing |
Previous Message | Tom Lane | 2003-03-07 05:07:56 | Re: stats_command_string default? |