Re: [HACKERS] OR with multi-key indexes - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] OR with multi-key indexes
Date
Msg-id 35C30622.4E86FA49@krs.ru
Whole thread Raw
In response to OR with multi-key indexes  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] OR with multi-key indexes
List pgsql-hackers
Bruce Momjian wrote:
>
> Here is a comment in path/indxpath.c that says they don't want to use
> multi-key indexes with OR clauses.  Of course, we now support multi-key
> indexes, and this code was disabled anyway because it was broken.  (In
> fact, it was disabled by having SingleAttributeIndex() always return
> false.
>
> Is there any reason we can't use multi-key indexes if the first key
> matches our OR column?  I don't see why not.  Also, I don't know how to
                          ^^^^^^^^^^^^^^^^^^^
Me too.

> handle the case where we specify the first key of a multi-key index in
> an AND clause, and specify the second key in an OR clause because the

What do you mean? Example please...

> AND's are handled in a separate are of the code.  Any ideas how to
> implement this?  (Of course, the code would still use the index for the
> AND, but I don't know how to bring the AND case into my OR index clause
> processing area.)

Vadim

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: OR with multi-key indexes
Next
From: David Hartwig
Date:
Subject: 6.4 Aggregate Bug