Re: [PATCH] Partial indicies almost working (I think) - Mailing list pgsql-general

From Tom Lane
Subject Re: [PATCH] Partial indicies almost working (I think)
Date
Msg-id 26944.994217799@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Partial indicies almost working (I think)  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: [PATCH] Partial indicies almost working (I think)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.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

pgsql-general by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Error: "Conversion between UNICODE..."
Next
From: Scott Holmes
Date:
Subject: lo wrappers - still working on it