Re: using index on comparison with bit-operation?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Michael Groth <geek_1981(at)yahoo(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: using index on comparison with bit-operation?
Date: 2004-04-08 21:41:40
Message-ID: 20040408214140.GA32191@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 07, 2004 at 06:01:03 -0700,
Michael Groth <geek_1981(at)yahoo(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-04-08 21:45:14 Re: using index on comparison with bit-operation?
Previous Message Dann Corbit 2004-04-08 21:01:16 Re: Small suggestion on build script