ETS retrieve all objects before deleting the table

Mikael Pettersson mikpelinux@REDACTED
Mon Jan 17 23:50:04 CET 2022


On Mon, Jan 17, 2022 at 10:02 PM Frank Muller
<frank.muller.erl@REDACTED> wrote:
>
> Hey guys,
>
> Is there a way (documented or not) to retrieve all objects from an ordered_set table?
>
> I’d like to retrieve all objects before deleting the table.
> What’s the most efficient way to do it?
>
> My table contains roughly ~1 million objects.
> Objects are tuple: {non_neg_integer(), pos_integer()}

ets:tab2list/1, or possibly ets:match_object/2 or ets:select/2 (I
haven't benchmarked them).
They are all documented.

($subject mentions ETS, so I assume this is about plain ETS and not
Mnesia ram_copies or something like that.)


More information about the erlang-questions mailing list