diff options
author | Nick Marino <[email protected]> | 2013-04-12 13:57:58 -0400 |
---|---|---|
committer | Nick Marino <[email protected]> | 2013-04-12 15:17:01 -0400 |
commit | ac9540ee6d508f707abf40dd79ebd738f4272db7 (patch) | |
tree | 35df5d2a4568823985f4474996d6ce9866113ad1 /lib/mnesia/AUTHORS | |
parent | e09920ed1da9ebf3efa814d8f5039140109beab3 (diff) | |
download | otp-ac9540ee6d508f707abf40dd79ebd738f4272db7.tar.gz otp-ac9540ee6d508f707abf40dd79ebd738f4272db7.tar.bz2 otp-ac9540ee6d508f707abf40dd79ebd738f4272db7.zip |
Optimize index creation for Mnesia set tables
ETS bag tables have very poor performance on insertion if you have lots
of rows with duplicate keys, since it has to check each existing record
and make sure it's not inserting any duplicates. This can lead to some
pretty drastic slowdowns when inserting lots of rows into an Mnesia
table, IF you're introducing lots of duplicate values into an indexed
column.
As it turns out, we can fix this by switching to duplicate_bag tables
for storing Mnesia indexes on tables of type 'set', and it ultimately
makes no functional difference since we will never actually attempt to
insert any duplicate records anyway. (We would have to make some bigger
changes to make this work for Mnesia bag tables though, so that is left
as a possible enhancement for the future.)
Diffstat (limited to 'lib/mnesia/AUTHORS')
0 files changed, 0 insertions, 0 deletions