Search code examples
erlangets

Where is Erlang Term Storage (ETS) stored?


Hi I am learning Erlang.

I read from http://learnyousomeerlang.com/ets

Erlang has something called ETS (Erlang Term Storage) tables. ETS tables are an efficient in-memory database included with the Erlang virtual machine. [...]

My question is: The Erlang term data stored in ETS tables - Where are they stored? Are they temporarily stored in my computer's memory? If I restart my application, will they disappear?


Solution

    • ETS are RAM based and will disapear when the owner process terminates.
    • DETS are disk-based version of ETS. Being "disk-only" they are slow.
    • For more advanced usage, you should take a look at Mnesia, the standard Erlang DBMS.

    The documentation has some basic comparisons between those three options.