<div dir="auto">Hi Mikael,</div><div dir="auto"><br></div><div dir="auto">I tried them all before posting here.</div><div dir="auto"><br></div><div dir="auto">From fastest to slowest:</div><div dir="auto">1. select/2 (stable numbers)</div><div dir="auto"><span style="border-color:rgb(0,0,0);color:rgb(0,0,0)">2. match_object/2</span></div><div dir="auto">3. first/1 + next/2</div><div dir="auto">4. tab2list</div><div dir="auto"><br></div><div dir="auto">Is there a way to only retrieve keys from an ETS table?</div><div dir="auto">/Frank<br></div><div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><br>On Mon, Jan 17, 2022 at 10:02 PM Frank Muller<br>
<<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br>
><br>
> Hey guys,<br>
><br>
> Is there a way (documented or not) to retrieve all objects from an ordered_set table?<br>
><br>
> I’d like to retrieve all objects before deleting the table.<br>
> What’s the most efficient way to do it?<br>
><br>
> My table contains roughly ~1 million objects.<br>
> Objects are tuple: {non_neg_integer(), pos_integer()}<br>
<br>
ets:tab2list/1, or possibly ets:match_object/2 or ets:select/2 (I<br>
haven't benchmarked them).<br>
They are all documented.<br>
<br>
($subject mentions ETS, so I assume this is about plain ETS and not<br>
Mnesia ram_copies or something like that.)<br>
</blockquote></div></div>