[erlang-questions] How performant is ets:select ?
Benoit Chesneau
bchesneau@REDACTED
Sun Jul 5 19:51:16 CEST 2015
thanks for the links an tips. It gives me some good direction. I will
report soon my findings as well :)
On Sat 4 Jul 2015 at 14:45 Jachym Holecek <freza@REDACTED> wrote:
> # Benoit Chesneau 2015-07-04:
> > Does anyone have links or knows how ets:select is performing? Not that I
> > have any issue with it right now, but I am wondering if there are already
> > some benchmarks or known limits about it I should be aware.
> >
> > Also how does it works internally, the doc let me think it is traversing
> > all the keys but not sure about it.
>
> The ordered_set variety should be doing a prefix scan whenever it can,
> rather than full table scan. Not sure how strong it is at figuring out
> more general range-scans.
>
> Some discussion is here:
>
> http://www.erlang.org/doc/efficiency_guide/tablesDatabases.html
>
> The ets:select/3 + ets:select/1 variants can help you place upper bounds
> on some of the costs, a bit indirectly perhaps. That's more on the safety
> engineering side of things I suppose.
>
> Breaking things into multiple tables of appropriate types and layouts as
> suggested by Max is sound advice -- once you have a solid data model and
> understand your access patterns well.
>
> HTH,
> -- Jachym
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150705/cb384e3b/attachment.htm>
More information about the erlang-questions
mailing list