Michael, > > is it possible to use an index on the expression '(table_1.field & > > table_2.field)::int > 0' ? Not practically, no. If it's important to you for comparisons to be indexed, then stop doing bitwise stuff and normalize your tables. Bitwise fields are what is known as "non-atomic" data, and violate the First Normal Form (or is it the Second? Don't recall). Your particular problem is one of the illustrations of why they are problematic. The only times I use bitwise fields in my systems is when: a) their content is going to be processed entirely by external (middleware/ interface) code and not queries, and b) they will never themselves be a search condition. -- -Josh BerkusAglio Database SolutionsSan Francisco
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера