[erlang-questions] Reading An Mnesia Index (Not The Records It Points To)

Jacob Perkins japerk@REDACTED
Fri May 1 02:37:52 CEST 2009


It'd probably be easier to manage the index yourself as a separate table.
Maybe an ordered_set table where the record is something like {key={indice,
record_id}, val=val}. Then you can match on the indice to pull out
record_ids and vals.

Jacob

I have an index on a table that represents a user taxonomy - how the
> user has chosen to organise their world in the application.
>
> It is a fairly dense index, that is for each indice there will be
> between 30 and several hundred actual records.
>
> At the moment to expose the taxonomy to the user I have to build a
> query that returns the value of the index from every record, and then
> de-duplicate that back down to get the index - which has been slow on
> occasions...
>
> As far as I can tell there is no way through the published API to
> simply 'read the index' but I am sure I could plow into the code and
> 'work it out' but I am wary of the old 'undocumented API' beartrap.
>
> Any suggestions?
>
> Gordon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090430/b5ee53a4/attachment.htm>


More information about the erlang-questions mailing list