Optimize index creation for Mnesia set tables
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.)

bernardd/otp,ferd/otp,emile/otp,g-andrade/otp,cobusc/otp,c-rack/otp,platinumthinker/otp,tuncer/otp,weisslj/otp,lightcyphers/otp,schlagert/otp,Teino1978-Corp/erlang-otp,riverrun/otp,saleyn/otp,bernardd/otp,bjorng/otp,lucafavatella/otp,emile/otp,Teino1978-Corp/erlang-otp,RGafiyatullin/otp,enikki/otp,hairyhum/otp,sdebnath/otp,mikpe/otp,falkevik/otp,isvilen/otp,paladim/otp,jamesruan/otp,yangchengjian/otp,sdebnath/otp,kvakvs/otp,jinshana/otp,awetzel/otp,jinshana/otp,palas/otp,getong/otp,GinjaNinja32/otp,tuncer/otp,jamesruan/otp,bsmr-erlang/otp,lhslll/otp,release-project/otp,NOMORECOFFEE/otp,GinjaNinja32/otp,RJ/otp,potatosalad/otp,rlipscombe/otp,RaimoNiskanen/otp,massemanet/otp,haguenau/otp,sdebnath/otp,beni55/otp,dumbbell/otp,ahmedshafeeq/otp,getong/otp,electricimp/otp,bjorng/otp,derek121/otp,goertzenator/otp,emacsmirror/erlang,vinoski/otp,tuncer/otp,emacsmirror/erlang,paladim/otp,GinjaNinja32/otp,rlipscombe/otp,kvakvs/otp,basho/otp,RJ/otp,legoscia/otp,hairyhum/otp,sitexa/otp,dgud/otp,krishnakumar4a4/otp,vinoski/otp,NOMORECOFFEE/otp,falkevik/otp,mujiatong/otp,neeraj9/otp,isvilen/otp,lhslll/otp,RichMorin/otp,dgud/otp,jamesruan/otp,bjorng/otp,lucafavatella/otp,theom/otp,goertzenator/otp,theom/otp,matwey/otp,palas/otp,beni55/otp,basho/otp,RaimoNiskanen/otp,dgud/otp,kvakvs/otp,jamesruan/otp,vladdu/otp,goertzenator/otp,palas/otp,cobusc/otp,potatosalad/otp,goertzenator/otp,mujiatong/otp,legoscia/otp,emacsmirror/erlang,sdebnath/otp,uabboli/otp,marquisthunder/otp,entropiae/otp,jamesruan/otp,RJ/otp,lhslll/otp,johanclaesson/otp,VincentHHL/otp,paladim/otp,dgud/otp,benoitc/otp-1,RJ/otp,erlang/otp,bjorng/otp,legoscia/otp,release-project/otp,saleyn/otp,benoitc/otp-1,goertzenator/otp,ferd/otp,isvilen/otp,entropiae/otp,sammoth-wazoku/otp,Teino1978-Corp/erlang-otp,emile/otp,fenollp/otp,massemanet/otp,vic/otp,tuncer/otp,bugs-erlang-org/otp,release-project/otp,awetzel/otp,neeraj9/otp,beni55/otp,stolen/otp,entropiae/otp,erlang/otp,theom/otp,NOMORECOFFEE/otp,mujiatong/otp,stolen/otp,enikki/otp,NOMORECOFFEE/otp,dumbbell/otp,basho/otp,jj1bdx/otp,ferd/otp,lantti/otp,matwey/otp,release-project/otp,sammoth-wazoku/otp,kvakvs/otp,schlagert/otp,aboroska/otp,stolen/otp,paladim/otp,rlipscombe/otp,riverrun/otp,lantti/otp,NOMORECOFFEE/otp,jemsbhai/otp,RoadRunnr/otp,matwey/otp,massemanet/otp,g-andrade/otp,release-project/otp,kvakvs/otp,emile/otp,enikki/otp,emacsmirror/erlang,derek121/otp,Teino1978-Corp/otp,g-andrade/otp,vic/otp,VincentHHL/otp,GinjaNinja32/otp,cnbin/otp,jj1bdx/otp,dumbbell/otp,jj1bdx/otp,legoscia/otp,getong/otp,vladdu/otp,benoitc/otp-1,sdebnath/otp,emile/otp,gjaldon/otp,marquisthunder/otp,potatosalad/otp,dumbbell/otp,ferd/otp,neeraj9/otp,lrascao/otp,erlang/otp,jinshana/otp,cobusc/otp,emacsmirror/erlang,riverrun/otp,jinshana/otp,palas/otp,RGafiyatullin/otp,jemsbhai/otp,g-andrade/otp,tuncer/otp,cobusc/otp,jj1bdx/otp,jinshana/otp,Teino1978-Corp/erlang-otp,emacsmirror/erlang,RoadRunnr/otp,g-andrade/otp,legoscia/otp,emacsmirror/erlang,johanclaesson/otp,sitexa/otp,VincentHHL/otp,marquisthunder/otp,beni55/otp,g-andrade/otp,RichMorin/otp,platinumthinker/otp,jj1bdx/otp,derek121/otp,lemenkov/otp,ferd/otp,emile/otp,msantos/otp,ahmedshafeeq/otp,paladim/otp,massemanet/otp,paulcager/otp,enikki/otp,jinshana/otp,isvilen/otp,lantti/otp,mujiatong/otp,ader1990/otp,lantti/otp,RichMorin/otp,electricimp/otp,vic/otp,mujiatong/otp,Teino1978-Corp/otp,fenollp/otp,Teino1978-Corp/otp,bjorng/otp,marquisthunder/otp,schlagert/otp,derek121/otp,sdebnath/otp,mikpe/otp,weisslj/otp,rlipscombe/otp,emile/otp,ader1990/otp,erlang/otp,vic/otp,derek121/otp,paulcager/otp,hairyhum/otp,vinoski/otp,msantos/otp,benoitc/otp-1,NOMORECOFFEE/otp,lrascao/otp,ahmedshafeeq/otp,erlang/otp,matwey/otp,lightcyphers/otp,RaimoNiskanen/otp,krishnakumar4a4/otp,beni55/otp,bsmr-erlang/otp,legoscia/otp,haguenau/otp,rlipscombe/otp,isvilen/otp,RoadRunnr/otp,bsmr-erlang/otp,RoadRunnr/otp,krishnakumar4a4/otp,vinoski/otp,schlagert/otp,vic/otp,erlang/otp,klarna/otp,ferd/otp,RGafiyatullin/otp,lrascao/otp,platinumthinker/otp,bernardd/otp,vic/otp,ader1990/otp,cobusc/otp,hairyhum/otp,psyeugenic/otp,paulcager/otp,bsmr-erlang/otp,lantti/otp,enikki/otp,tuncer/otp,lemenkov/otp,lrascao/otp,emacsmirror/erlang,sammoth-wazoku/otp,bsmr-erlang/otp,ader1990/otp,massemanet/otp,goertzenator/otp,lianghaivv/otp,Teino1978-Corp/otp,gjaldon/otp,ahmedshafeeq/otp,haguenau/otp,saleyn/otp,rlipscombe/otp,jinshana/otp,lemenkov/otp,theom/otp,electricimp/otp,bugs-erlang-org/otp,potatosalad/otp,rlipscombe/otp,falkevik/otp,mikpe/otp,Teino1978-Corp/erlang-otp,release-project/otp,RGafiyatullin/otp,yangchengjian/otp,jj1bdx/otp,uabboli/otp,weisslj/otp,basho/otp,yangchengjian/otp,erlang/otp,gjaldon/otp,jemsbhai/otp,psyeugenic/otp,hairyhum/otp,falkevik/otp,isvilen/otp,haguenau/otp,RaimoNiskanen/otp,bsmr-erlang/otp,paulcager/otp,beni55/otp,fenollp/otp,erlang/otp,electricimp/otp,NOMORECOFFEE/otp,neeraj9/otp,lemenkov/otp,lrascao/otp,release-project/otp,vladdu/otp,cnbin/otp,psyeugenic/otp,dumbbell/otp,RGafiyatullin/otp,fenollp/otp,ahmedshafeeq/otp,jemsbhai/otp,krishnakumar4a4/otp,RGafiyatullin/otp,lightcyphers/otp,palas/otp,lianghaivv/otp,lrascao/otp,g-andrade/otp,bugs-erlang-org/otp,psyeugenic/otp,psyeugenic/otp,bjorng/otp,gjaldon/otp,NOMORECOFFEE/otp,kvakvs/otp,kvakvs/otp,basho/otp,theom/otp,ahmedshafeeq/otp,vinoski/otp,psyeugenic/otp,bjorng/otp,GinjaNinja32/otp,bjorng/otp,isvilen/otp,sammoth-wazoku/otp,ahmedshafeeq/otp,uabboli/otp,release-project/otp,erlang/otp,cnbin/otp,cnbin/otp,sitexa/otp,cobusc/otp,derek121/otp,uabboli/otp,RichMorin/otp,electricimp/otp,cnbin/otp,isvilen/otp,riverrun/otp,RoadRunnr/otp,getong/otp,bernardd/otp,entropiae/otp,vladdu/otp,goertzenator/otp,vinoski/otp,tuncer/otp,saleyn/otp,vladdu/otp,fenollp/otp,bjorng/otp,awetzel/otp,RaimoNiskanen/otp,RJ/otp,lrascao/otp,paulcager/otp,yangchengjian/otp,basho/otp,c-rack/otp,jj1bdx/otp,vladdu/otp,lucafavatella/otp,Teino1978-Corp/otp,c-rack/otp,massemanet/otp,VincentHHL/otp,sitexa/otp,GinjaNinja32/otp,johanclaesson/otp,ahmedshafeeq/otp,lhslll/otp,aboroska/otp,Teino1978-Corp/erlang-otp,isvilen/otp,derek121/otp,lhslll/otp,lrascao/otp,sdebnath/otp,electricimp/otp,aboroska/otp,jemsbhai/otp,stolen/otp,fenollp/otp,RJ/otp,saleyn/otp,bugs-erlang-org/otp,dgud/otp,lianghaivv/otp,RoadRunnr/otp,lucafavatella/otp,bernardd/otp,platinumthinker/otp,mikpe/otp,GinjaNinja32/otp,lucafavatella/otp,schlagert/otp,msantos/otp,jamesruan/otp,dumbbell/otp,weisslj/otp,lianghaivv/otp,VincentHHL/otp,paulcager/otp,dumbbell/otp,fenollp/otp,GinjaNinja32/otp,mikpe/otp,RichMorin/otp,falkevik/otp,lrascao/otp,aboroska/otp,uabboli/otp,basho/otp,entropiae/otp,bsmr-erlang/otp,cnbin/otp,saleyn/otp,lemenkov/otp,kvakvs/otp,platinumthinker/otp,lightcyphers/otp,lantti/otp,palas/otp,sdebnath/otp,msantos/otp,aboroska/otp,lightcyphers/otp,lantti/otp,release-project/otp,electricimp/otp,bugs-erlang-org/otp,platinumthinker/otp,theom/otp,awetzel/otp,lightcyphers/otp,krishnakumar4a4/otp,vic/otp,haguenau/otp,neeraj9/otp,legoscia/otp,mikpe/otp,sammoth-wazoku/otp,RGafiyatullin/otp,Teino1978-Corp/otp,msantos/otp,krishnakumar4a4/otp,Teino1978-Corp/erlang-otp,klarna/otp,paladim/otp,schlagert/otp,haguenau/otp,vladdu/otp,c-rack/otp,vladdu/otp,c-rack/otp,palas/otp,RichMorin/otp,dgud/otp,weisslj/otp,matwey/otp,uabboli/otp,riverrun/otp,riverrun/otp,gjaldon/otp,falkevik/otp,bugs-erlang-org/otp,uabboli/otp,jamesruan/otp,lucafavatella/otp,bsmr-erlang/otp,palas/otp,fenollp/otp,potatosalad/otp,VincentHHL/otp,RJ/otp,g-andrade/otp,bjorng/otp,stolen/otp,awetzel/otp,paulcager/otp,psyeugenic/otp,msantos/otp,ferd/otp,lemenkov/otp,krishnakumar4a4/otp,falkevik/otp,platinumthinker/otp,riverrun/otp,yangchengjian/otp,massemanet/otp,dumbbell/otp,stolen/otp,theom/otp,rlipscombe/otp,enikki/otp,johanclaesson/otp,marquisthunder/otp,RJ/otp,weisslj/otp,lightcyphers/otp,emacsmirror/erlang,lianghaivv/otp,gjaldon/otp,potatosalad/otp,c-rack/otp,dgud/otp,g-andrade/otp,falkevik/otp,stolen/otp,vladdu/otp,vinoski/otp,paulcager/otp,enikki/otp,benoitc/otp-1,cobusc/otp,vinoski/otp,getong/otp,uabboli/otp,c-rack/otp,jamesruan/otp,weisslj/otp,msantos/otp,RoadRunnr/otp,dgud/otp,benoitc/otp-1,cnbin/otp,RaimoNiskanen/otp,lemenkov/otp,paladim/otp,ahmedshafeeq/otp,platinumthinker/otp,awetzel/otp,dumbbell/otp,basho/otp,enikki/otp,vinoski/otp,bugs-erlang-org/otp,getong/otp,psyeugenic/otp,mikpe/otp,hairyhum/otp,legoscia/otp,bernardd/otp,electricimp/otp,weisslj/otp,hairyhum/otp,klarna/otp,uabboli/otp,goertzenator/otp,awetzel/otp,sitexa/otp,johanclaesson/otp,RoadRunnr/otp,jj1bdx/otp,electricimp/otp,emile/otp,RichMorin/otp,kvakvs/otp,marquisthunder/otp,jj1bdx/otp,paladim/otp,sammoth-wazoku/otp,stolen/otp,johanclaesson/otp,matwey/otp,RaimoNiskanen/otp,getong/otp,lhslll/otp,haguenau/otp,benoitc/otp-1,marquisthunder/otp,saleyn/otp,haguenau/otp,potatosalad/otp,massemanet/otp,lightcyphers/otp,neeraj9/otp,theom/otp,getong/otp,gjaldon/otp,lianghaivv/otp,klarna/otp,basho/otp,potatosalad/otp,lianghaivv/otp,ader1990/otp,schlagert/otp,sitexa/otp,bernardd/otp,tuncer/otp,marquisthunder/otp,aboroska/otp,isvilen/otp,potatosalad/otp,mikpe/otp,VincentHHL/otp,saleyn/otp,vic/otp,saleyn/otp,entropiae/otp,erlang/otp,sitexa/otp,jj1bdx/otp,yangchengjian/otp,rlipscombe/otp,jemsbhai/otp,entropiae/otp,neeraj9/otp,jinshana/otp,fenollp/otp,rlipscombe/otp,dgud/otp,legoscia/otp,beni55/otp,sitexa/otp,bsmr-erlang/otp,aboroska/otp,matwey/otp,benoitc/otp-1,matwey/otp,hairyhum/otp,yangchengjian/otp,emile/otp,massemanet/otp,bugs-erlang-org/otp,jemsbhai/otp,ader1990/otp,lantti/otp,dgud/otp,Teino1978-Corp/erlang-otp,msantos/otp,bernardd/otp,Teino1978-Corp/otp,sammoth-wazoku/otp,ferd/otp,mikpe/otp,goertzenator/otp,klarna/otp,schlagert/otp,RaimoNiskanen/otp,klarna/otp,ferd/otp,cnbin/otp,ader1990/otp,jemsbhai/otp,klarna/otp,mujiatong/otp,matwey/otp,klarna/otp,dumbbell/otp,getong/otp,mujiatong/otp,aboroska/otp,VincentHHL/otp,ader1990/otp,RoadRunnr/otp,krishnakumar4a4/otp,johanclaesson/otp,emacsmirror/erlang,tuncer/otp,RGafiyatullin/otp,RaimoNiskanen/otp,entropiae/otp,yangchengjian/otp,johanclaesson/otp,sammoth-wazoku/otp,g-andrade/otp,lianghaivv/otp,Teino1978-Corp/otp,weisslj/otp,awetzel/otp,falkevik/otp,mikpe/otp,RichMorin/otp,c-rack/otp,getong/otp,neeraj9/otp,cobusc/otp,lemenkov/otp,beni55/otp,lhslll/otp,lhslll/otp,derek121/otp,aboroska/otp,riverrun/otp,lucafavatella/otp,vinoski/otp,mujiatong/otp,lucafavatella/otp,bernardd/otp,potatosalad/otp,gjaldon/otp