Planner question - "bit" data types

Поиск
Список
Период
Сортировка
От Karl Denninger
Тема Planner question - "bit" data types
Дата
Msg-id 4AA16747.50100@denninger.net
обсуждение исходный текст
Ответы Re: Planner question - "bit" data types
Список pgsql-performance
Does the planner know how to use indices to optimize these queries?

For reference, I was having SEVERE performance problems with the
following comparison in an SQL statement where "mask" was an integer:

"select ... from .... where ...... and (permission & mask = permission)"

This resulted in the planner deciding to run a nested loop and
extraordinarily poor performance.

I can probably recode the application to use a field of type "bit(32)"
and either cast to an integer or have the code do the conversion
internally (its just a shift eh?)

The question is whether the above statement will be reasonably planned
if "mask" is a bit type.


-- Karl Denninger

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Seeking performance advice and explanation for high I/O on 8.3
Следующее
От: "Scott Otis"
Дата:
Сообщение: Re: Seeking performance advice and explanation for high I/O on 8.3