[erlang-questions] Index Overhead In Mnesia

Ben Hood 0x6e6562@REDACTED
Thu Jun 12 13:03:20 CEST 2008


Scott,

On Thu, Jun 12, 2008 at 12:32 AM, Scott Lystig Fritchie
<fritchie@REDACTED> wrote:
>
>  term()                     ... where term() is too popular, e.g. 5
>
> to something like:
>
>  {term(), much_less_frequent_filler_term()}
>
> ... where the 2nd term is calculated by something like:
>
>  {_, _, FillerNumber} = erlang:now()
>
> Because the entire term is unique (or has very few duplicates), the
> secondary index bag (or duplicate_bag, I forget) doesn't blow up with
> O(N^2) behavior.

Doesn't this render the index useless though? Is this not just
creating more index entries so that reading the index is the same as
doing a full table scan?

Ben



More information about the erlang-questions mailing list