# See all entities

**URL:** <https://forum.datomic.com/t/see-all-entities/1777>\
**Category:** Datomic Cloud\
**Created:** [February 19, 2021, 11:12am UTC](https://forum.datomic.com/t/see-all-entities/1777 "2021-02-19T11:12:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/mikhail/32/620_2.png) [@Mikhail](https://forum.datomic.com/u/Mikhail)\
**Post date:** [February 19, 2021, 11:12am UTC](https://forum.datomic.com/t/see-all-entities/1777/1 "2021-02-19T11:12:45Z")

</div>

I’m struggling with making a query that would show me all entities in the database. I tried this:

```
(d/q '[:find ?e ?a ?v
       :in $ 
       :where [?e ?a ?v]]
     db)

```

But I get an error: Insufficient binding of db clause: [?e ?a ?v] would cause full scan

What if full scan is what I need? How do I do it?

---

<div class="post-metadata">

**Author:** ![jmshelby](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/jmshelby/32/437_2.png) [@jmshelby](https://forum.datomic.com/u/jmshelby)\
**Post date:** [February 19, 2021, 5:48pm UTC](https://forum.datomic.com/t/see-all-entities/1777/2 "2021-02-19T17:48:34Z")

</div>

A query is used to get back much more limited sets of data, using the indexes, plus cache, plus the predicates in the query to unify all the variables to a resulting set. The way your query is written, has no predicates, and unification results in every latest datom (presuming you’re _not_ using a history DB) … So it’s not really querying anything.

I looks like you just want access to the :eavt index directly - you can get pretty much exactly what you’re trying to do (and a bit more) with the `datoms` fn: [datomic.client.api documentation](https://docs.datomic.com/client-api/datomic.client.api.html#var-datoms)

OR - if you want to just iterate on distinct entities, while simultaneously pulling all of their attributes/values (as a seq of entity maps) - then you can use the very handy `index-pull` fn using the :avet index - this however requires that you provide at least the name of an attribute that the entities must have, but usually that’s more useful anyway. You can do this with a query as well, but `index-pull` walks the sorted index in the order of the values (if that is advantageous to you)

---

<div class="post-metadata">

**Author:** ![Mikhail](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/mikhail/32/620_2.png) [@Mikhail](https://forum.datomic.com/u/Mikhail)\
**Post date:** [February 22, 2021, 1:29pm UTC](https://forum.datomic.com/t/see-all-entities/1777/3 "2021-02-22T13:29:25Z")

</div>

Thanks, it’s starting to make sense 🙂
