Database / Mnesia basics Interview questions
What is mnesia:info/0 used for?
mnesia:info/0 prints a human-readable summary of the running Mnesia system directly to the
shell: which tables exist, their sizes, storage types, which nodes hold copies, and general system status
— a quick way to sanity-check the state of the database without writing any query code.
1> mnesia:info(). ---> Processes holding locks <--- ---> Processes waiting for locks <--- ---> Participant transactions <--- ... Table Type Size ...
It's mainly a diagnostic/debugging tool used interactively in a shell session, not something application
code calls programmatically — for structured, code-level introspection of a specific table, you'd use
mnesia:table_info/2 instead, which returns a specific piece of information you can pattern match
on or act on programmatically.
More Related questions...