Heikki Linnakangas <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Hmm, the ~~ condition should get treated as a "filter" not a "recheck". >> I suppose I broke this somewhere ...
> I started to look at this last night. The culprit seems to be this patch: Yeah, it appears that I oversimplified matters in that patch. I think that I mistakenly decided that create_bitmap_subplan() only needed one output parameter because there was no longer a need to distinguish between lossy and nonlossy operators. What I forgot was that the "nonlossy" output was also coming from the "indexquals" rather than the "indexclauses", and that's different precisely in the case where we've got a special index operator such as LIKE. I think what probably has to happen is revert most of that simplification and have create_bitmap_subplan return suitable representations of both the indexquals and indexclauses. > Attached is a patch that changes create_bitmap_subplan so that the > condition put into Recheck condition is never stronger than the > condition automatically handled by the index. Does that look right to you? I think this is still too simplistic, but will look closer. One point is that it's not accounting for the bitmap AND/OR structure that might be above the individual indexscans. The original coding avoided that problem by making all the decisions at the top level, and I'm inclined to stick with that approach. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers