OT - Query for bit pattern

Поиск
Список
Период
Сортировка
От Paul Tomblin
Тема OT - Query for bit pattern
Дата
Msg-id 47EC50FF.6000407@gmail.com
обсуждение исходный текст
Ответы Re: OT - Query for bit pattern  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
If I have a bunch of data where one column in the table is a bitmap, is there
an efficient way to do a query for all the records whose bitmap's first N bits
matches a particular pattern?   Naively, I would store it as an int and do
whatever the sql equivalent of '(hhcode & 0b11110000...) = 0b010100000...)'.
But that is probably horribly inefficient.  Is there a better way?

--
Paul Tomblin <ptomblin@xcski.com> http://blog.xcski.com/
Revenge is an integral part of forgiving and forgetting.
               -- The BOFH

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: performance issue
Следующее
От: Tom Lane
Дата:
Сообщение: Re: OT - Query for bit pattern