[erlang-questions] Index Overhead In Mnesia

Hynek Vychodil vychodil.hynek@REDACTED
Tue Jun 10 17:25:49 CEST 2008


I think this is feature of bag and duplicate_bag ets table types and is
mentioned in manual.

On Tue, Jun 10, 2008 at 5:00 PM, Ben Hood <0x6e6562@REDACTED> wrote:

> Hynek,
>
> On 10 Jun 2008, at 13:46, Hynek Vychodil wrote:
>
>  It is not obvious, but try change your write:
>>
>> write(_,0) -> ok;
>> write(X,N) ->
>>    T = now(),
>>    mnesia:write(X#a{id = T, first = T, second = T}),
>>    write(X,N-1).
>>
>> and think what happened to indexes in previous version :-)
>>
>
> Very interesting!
>
> So, if I understand you correctly, what I conclude is that the index
> performance degrades when you have lots of identical keys.
>
> Do you know why this is the case?
>
> Does the index perhaps maintain a list of values for each key and hence the
> set of values has to be updated continuously?
>
> If so, is this a bug or a feature?
>
> Thx,
>
> Ben
>



-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080610/1e46b3c3/attachment.htm>


More information about the erlang-questions mailing list