# Partial matching ETS data

**URL:** <https://forum.elixirforum.com/t/partial-matching-ets-data/44602>\
**Category:** Questions\
**Tags:** ets, pattern-matching\
**Created:** [December 16, 2021, 2:17pm UTC](https://forum.elixirforum.com/t/partial-matching-ets-data/44602 "2021-12-16T14:17:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![al2o3cr](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/32/3457_2.png) [@al2o3cr](https://forum.elixirforum.com/u/al2o3cr)\
**Post date:** [December 16, 2021, 7:42pm UTC](https://forum.elixirforum.com/t/partial-matching-ets-data/44602/5 "2021-12-16T19:42:57Z")

</div>

Answering a “starts with” query like that efficiently (ie not with a full table scan) in Postgres requires a B-tree index; with ETS you’ll need to construct something similar yourself.

The Efficiency Guide goes into some [more detail](https://www.erlang.org/doc/efficiency_guide/tablesdatabases#using-keys-of-ets-table) about this approach.

---

_[View the full topic](https://forum.elixirforum.com/t/partial-matching-ets-data/44602)._
