Unused index in mnesia table

Goran Bage goran.bage@REDACTED
Thu Nov 18 10:28:37 CET 2004


We found a problem with mnesia tables with an index that is unused.
Loading a moderately sized table (40.000 entries) took forever
(5-10 min). It turns out that the loading time grows fast with the
table size (quadratic?) if an index is unused. To check it out I
wrote the attached module and tested loading tables of different
sizes, this is what I got just running each case once.
  N      Time
100     6
1000    62
10000   9878
20000   49939
50000   328575

Removing the unused index solved the problem. The reason I added an
unused index was that we will use it later on, so that is what you
get for trying to think ahead :-)

-- Goran
------------------------- May the Snow be with you ----
  Goran Bage,          MobileArts,     www.mobilearts.se
  Tjärhovsgatan 56,    SE-116 28 Stockholm,       Sweden
  email:goran.bage@REDACTED,  phone: +46 733 358405

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mtest.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20041118/1b516831/attachment.ksh>

More information about the erlang-questions mailing list