Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since Mnesia queries are just erlang functions I would imagine you can profile them the same way you would profile your own erlang code. <a href="http://www.erlang.org/doc/efficiency_guide/profiling.html#id2266192" rel="nofollow noreferrer">http://www.erlang.org/doc/efficiency_guide/profiling.html#id2266192</a> has more information on the erlang profiling tools available.</p> <p><strong>Update</strong> As a test I ran this at home on a test mnesia instance and using fprof to trace an mnesia qlc query returned output a sample of which I'm including below. So it definitely includes more information than just the query call.</p> <pre><code>.... {[{{erl_lint,pack_errors,1}, 2, 0.004, 0.004}], { {lists,map,2}, 2, 0.004, 0.004}, % [ ]}. {[{{mnesia_tm,arrange,3}, 1, 0.004, 0.004}], { {ets,first,1}, 1, 0.004, 0.004}, % [ ]}. {[{{erl_lint,check_remote_function,5}, 2, 0.004, 0.004}], { {erl_lint,check_qlc_hrl,5}, 2, 0.004, 0.004}, % [ ]}. {[{{mnesia_tm,multi_commit,4}, 1, 0.003, 0.003}], { {mnesia_locker,release_tid,1}, 1, 0.003, 0.003}, % [ ]}. {[{{mnesia,add_written_match,4}, 1, 0.003, 0.003}], { {mnesia,add_match,3}, 1, 0.003, 0.003}, % [ ]}. {[{{mnesia_tm,execute_transaction,5}, 1, 0.003, 0.003}], { {erlang,erase,1}, 1, 0.003, 0.003}, % [ ]}. {[{{mnesia_tm,intercept_friends,2}, 1, 0.002, 0.002}], { {mnesia_tm,intercept_best_friend,2}, 1, 0.002, 0.002}, % [ ]}. {[{{mnesia_tm,execute_transaction,5}, 1, 0.002, 0.002}], { {mnesia_tm,flush_downs,0}, 1, 0.002, 0.002}, % [ ]}. {[{{mnesia_locker,rlock_get_reply,4}, 1, 0.002, 0.002}], { {mnesia_locker,opt_lookup_in_client,3}, 1, 0.002, 0.002}, % [ ]}. {[ ], { undefined, 0, 0.000, 0.000}, % [{{shell,eval_exprs,6}, 0, 18.531, 0.000}, {{shell,exprs,6}, 0, 0.102, 0.024}, {{fprof,just_call,2}, 0, 0.034, 0.027}]}. </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload