Re: using index on comparison with bit-operation? - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: using index on comparison with bit-operation?
Date
Msg-id 20040408214140.GA32191@wolff.to
Whole thread Raw
In response to using index on comparison with bit-operation?  (geek_1981@yahoo.de (Michael Groth))
Responses Re: using index on comparison with bit-operation?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Wed, Apr 07, 2004 at 06:01:03 -0700, Michael Groth <geek_1981@yahoo.de> wrote:
> hi,
> 
> is it possible to use an index on the expression '(table_1.field &
> table_2.field)::int > 0' ?
> 
> here's the whole query:
> 
> SELECT 
>     COUNT(*)
> FROM
>     users AS users
> JOIN
>     search_profile AS search_profile ON
> (search_profile.bin_matching_field_0 &
> users.bin_matching_field_0)::int > 0
> WHERE
>     users.id = 190

In 7.4 you can create indexes on expressions.


pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: Small suggestion on build script
Next
From: Bruce Momjian
Date:
Subject: Re: using index on comparison with bit-operation?