Bit datatype performance?

Поиск
Список
Период
Сортировка
От Antonio Vieiro
Тема Bit datatype performance?
Дата
Msg-id CAPHN3JX1YNxnGsu3q5A0wGqMMwjXMcmu8LnZ72jepE2A=t23hA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bit datatype performance?
Re: Bit datatype performance?
Список pgsql-general
Hi all,

One of my entities 'E' may be 'tagged' with an arbitrary set of 256 tags 'T'.

A first approach could be to add a M:N relationship between 'E' and 'T'.

A second way to do this could be to add a BIT(256) datatype to 'E',
setting bits to '1' if the entity is tagged with each one of the 256
tags (i.e. using a 'bitmask' on the set of tags).

Since querying entities 'E' with a certain set of tags 'T' must be
very fast I was wondering if the second approach would be faster. What
do you think?

Thanks for any hints,
Antonio

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

Предыдущее
От: Scott Mead
Дата:
Сообщение: Re: pg_dump with select command
Следующее
От: Marcos Hercules Santos
Дата:
Сообщение: using trigger to change status in one table from the modification in other table