Thanks to visit codestin.com
Credit goes to postgrespro.com

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

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(*)
FROMusers AS users
JOINsearch_profile AS search_profile ON
(search_profile.bin_matching_field_0 &
users.bin_matching_field_0)::int > 0
WHEREusers.id = 190
best regards

michael


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Function to kill backend
Next
From: Chris Browne
Date:
Subject: The Tomb of the Unknown Type?