In article ,
Antonio Vieiro writes:
> 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
Hi,
Thanks for the tip. Maybe two UUIDs are a best approach. I'll see which
is more performant.
Kind regards,
Antonio
El 14/09/11 19:32, Radosław Smogura escribió:
Hi,
I think it's not bad approach if performance is important. I don't know
how b-tree index will work with bitset datatype, bu
Hi, if you are thinking to access data in that manner, what's the point of
bits (or tags)?
The idea behind having a value and then using a bitmask is to be able to
test the value against different bitmasks, each bitmask corresponding to a
different tag or tag combination.
The *where *statement yo
Hi,
I think it's not bad approach if performance is important. I don't know
how b-tree index will work with bitset datatype, but I assume it should
treat is as 256bit number (maybe someone more competive in internals
will answer this).
Please bear in mind, that this approach will work well o
Hi again,
Thanks for the tip. In fact I was thinking of creating an index on the
bitmask, so I could use:
... where t.bits = :mymask
directly, avoiding a full table scan. I assume this is possible
(indexing bit and comparing bits), isn't it?
Thanks,
Antonio
El 14/09/11 15:58, Radosław Smo
Other option is use an array of int2 instead of bit(256). It can be indexed.
2011/9/14, Radosław Smogura :
> On Wed, 14 Sep 2011 12:00:35 +0200, Antonio Vieiro wrote:
>> Hi all,
>>
>> One of my entities 'E' may be 'tagged' with an arbitrary set of 256
>> tags 'T'.
>>
>> A first approach coul
On Wed, 14 Sep 2011 12:00:35 +0200, Antonio Vieiro wrote:
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',
setti
On Sep 14, 2011, at 6:00, Antonio Vieiro wrote:
> 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',
> se
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