Have you tried this?<br><br>mnesia:table_info(Table_name, size).<br><br>Chandru<br><br><div class="gmail_quote">On 16 June 2013 20:14, Jonathan Leivent <span dir="ltr"><<a href="mailto:jleivent@comcast.net" target="_blank">jleivent@comcast.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the fastest way, avoiding locking, to tell if an ordered_set mnesia table is empty or not?  I'm assuming that if the table is not an ordered set, then:<br>


<br>
  mnesia:activity(ets, fun mnesia:first/1, [Table]) == '$end_of_table'<br>
<br>
is the fastest.  However, if the table is an ordered set, this seems like it could take O(logN) time.<br>
<br>
Would this be faster?:<br>
<br>
 mnesia:activity(ets, fun mnesia:table_info/2, [Table, size]) == 0<br>
<br>
Is there a faster alternative?<br>
<br>
-- Jonathan<br>
______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
</blockquote></div><br>