# Log range queryies performances

**URL:** <https://forum.datomic.com/t/log-range-queryies-performances/337>\
**Category:** Datomic Applications\
**Created:** [February 17, 2018, 7:58am UTC](https://forum.datomic.com/t/log-range-queryies-performances/337 "2018-02-17T07:58:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benoitc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/benoitc/32/154_2.png) [@benoitc](https://forum.datomic.com/u/benoitc)\
**Post date:** [February 17, 2018, 7:58am UTC](https://forum.datomic.com/t/log-range-queryies-performances/337/1 "2018-02-17T07:58:37Z")

</div>

I’m wondeeing how much ranges queries on a range are efficient. What is the underlying structure ? is this also a tree like the indexes?

---

<div class="post-metadata">

**Author:** ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)\
**Post date:** [February 19, 2018, 12:10pm UTC](https://forum.datomic.com/t/log-range-queryies-performances/337/2 "2018-02-19T12:10:41Z")

</div>

Range queries against the log should use the `tx-range` function ([https://docs.datomic.com/cloud/time/log.html](https://docs.datomic.com/cloud/time/log.html)).

As indicated in that documentation page, the log is organized for efficient access by transaction.

-M

---

<div class="post-metadata">

**Author:** ![benoitc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/benoitc/32/154_2.png) [@benoitc](https://forum.datomic.com/u/benoitc)\
**Post date:** [February 19, 2018, 12:26pm UTC](https://forum.datomic.com/t/log-range-queryies-performances/337/3 "2018-02-19T12:26:16Z")

</div>

I read the documentation. In fact more than the data structure I’m interested by what means performance there , is this O(N) ?

---

<div class="post-metadata">

**Author:** ![marshall](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/marshall/32/48_2.png) [@marshall](https://forum.datomic.com/u/marshall)\
**Post date:** [February 19, 2018, 1:29pm UTC](https://forum.datomic.com/t/log-range-queryies-performances/337/4 "2018-02-19T13:29:54Z")

</div>

Log access via `tx-data` is sub-linear in performance. The log is a tree-based structure similar to the other indexes ([https://docs.datomic.com/on-prem/indexes.html#log](https://docs.datomic.com/on-prem/indexes.html#log)).
