From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [PATCH] Partial indicies almost working (I think) |
Date: | 2001-07-04 03:36:39 |
Message-ID: | 26944.994217799@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> It just occured to me that there is an assumption there that there is no
> point just trying a straight index scan with no constraints since a
> sequential scan will always be faster in that case. But with partial
> indicies that assumption is no longer valid.
You're right, there is nothing that considers the possibility that the
partial index condition itself might make the use of the index
desirable. AFAIR, the index condition is only checked to see if the
index can legally be used. Beyond that, the index subject variables
(not the condition) have to match some aspect of the WHERE clause or
query ordering before the planner will expend any cycles to consider
the index further.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Holmes | 2001-07-04 03:56:20 | lo wrappers - still working on it |
Previous Message | Lincy Lin | 2001-07-04 02:54:22 | RE: Re: 7.1.2 ERROR: UNIQUE constraint matching given keys for referenced table ...... |