[erlang-questions] How performant is ets:select ?

Jachym Holecek freza@REDACTED
Sat Jul 4 14:42:03 CEST 2015

# 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:


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.

	-- Jachym

More information about the erlang-questions mailing list