[erlang-questions] Secondary Mnesia Table index

db masterofquestions@REDACTED
Wed Mar 5 19:32:41 CET 2008


Here is my problem:

I have a unique field in one of the mnesia set table.  Problem is that I
can't query on that unique key.  If I create a secondary index, based on
another field which is not so unique, this secondary index will bogg down
mnesia inserts.  Is this also true for dirty_insert?

mnesia bag table maybe an option.  But in some cases, certain (key, value)
pair would become bloated and unhealthy.  The data wouldn't produce good
uniform balanced distribution.

I have created first element of mnesia set table to be a tuple, composed of
unique_field and not_so_unique_field.

My record looks like this:
-record(Tab1, {{unique_field, not_so_unique_field},unique_field,
not_so_unique_field})

mnesia set table index is on the first element: {unique_field,
not_so_unique_field}

Would I be able query on not_so_unique_field with an index based on tuple
{unique_field, not_so_unique_field} ?

This little issue tempting me to look at jungerl-rdbms.  Before I spent
great deal of time on rdbms, I have few questions regarding it.

Does rdbms support dirty_read, dirty_insert and the above scenario?

thank you,
-- 
rk

That which we persist in doing becomes easier for us to do; not that the
nature of the thing itself is changed, but that our power to do is
increased.
-Ralph Waldo Emerson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080305/ad320a22/attachment.htm>


More information about the erlang-questions mailing list