[erlang-questions] Converting a mnesia table from set to ordered_set.
Chandru
chandrashekhar.mullaparthi@REDACTED
Wed Aug 26 18:20:44 CEST 2009
2009/8/21 G.S. <corticalcomputer@REDACTED>
> Hello,
>
> What's the best and fastest way to convert an already existing, fully
> populated, about 5 gig table that is of type set, to type = ordered_set?
>
> Thanks,
> -Gene
>
One way to do it is to:
* Write some code to traverse backup and re-insert records into new table
* Take a backup of the database
* Delete the table
* Create the table as ordered_set
* Invoke code written in step 1
Another way:
* Take a backup of the database
* Delete the table
* Create the table as an ordered_set
* mnesia:restore(Table_name, [{clear_tables, [Table_name]}, {default_op,
skip_tables}]).
cheers
Chandru
More information about the erlang-questions
mailing list