[erlang-questions] 2 indexes

Hynek Vychodil <>
Sat Apr 12 19:50:04 CEST 2008


You can use for example this:

{{IdForSide1, IdForSide2}, OtherStuff}

On Sat, Apr 12, 2008 at 4:57 PM, Stanisław Pitucha <>
wrote:

> Hi
> I'm trying to do something that will effectively work as 2 indexes in
> ets. I'm writing a proxy for connections so my connection list is
> {IdForSide1, IdForSide2, OtherStuff}. I'd like to find that tuple by
> any of ids quickly... is there a way to do it with only one tuple, or
> should I split it to 3 tables {IdForSide1, ConnectionRef},
> {IdForSide2, ConnectionRef}, {ConnectionRef, OtherStuff} ?
> That seems like rather heavy solution, or maybe not... I don't have
> that much experience with ets.
> Thanks for any ideas.
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



-- 
--Hynek (Pichi) Vychodil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080412/88cbc2a0/attachment.html>


More information about the erlang-questions mailing list