# Limit on paths

**URL:** <https://community.neo4j.com/t/limit-on-paths/46950>\
**Category:** Cypher\
**Created:** [November 4, 2021, 9:50am UTC](https://community.neo4j.com/t/limit-on-paths/46950 "2021-11-04T09:50:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayantest2](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shayantest2/32/5901_2.png) [@shayantest2](https://community.neo4j.com/u/shayantest2)\
**Post date:** [November 4, 2021, 9:50am UTC](https://community.neo4j.com/t/limit-on-paths/46950/1 "2021-11-04T09:50:58Z")

</div>

It seems that limit is not enforced on paths. My query:

```auto
match p=(n{name:'Richard Harris'})-[*]-(m{name:'Wil Wheaton'}) return p limit 1

```

I'm testing on the sample Movie DBMS (v. 4.3.3) in Neo4j Desktop. How should I enforce the limit on the number of paths?

I also tried this one but still I see many nodes and relationships:

```auto
match p=(n{name:'Richard Harris'})-[*]-(m{name:'Wil Wheaton'})
With p
limit 1
return p

```

---

<div class="post-metadata">

**Author:** ![Bennu](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/bennu/32/11659_2.png) [@Bennu](https://community.neo4j.com/u/Bennu)\
**Post date:** [November 4, 2021, 2:52pm UTC](https://community.neo4j.com/t/limit-on-paths/46950/2 "2021-11-04T14:52:59Z")

</div>

Hi @shayantest2 !

It works. it's just that this path you are getting is too long so you thinks is more than one. Remember that you are using the wildcard \*

Bennu

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [November 5, 2021, 11:02pm UTC](https://community.neo4j.com/t/limit-on-paths/46950/3 "2021-11-05T23:02:36Z")

</div>

If you're talking about the graphical results view from the Neo4j Browser, then this is because the browser will issue a separate query under the hood to get all the relationships existing between the nodes that were retrieved from your query, so you'll see more relationships than occur in the original query's results. All of the nodes involved however should be along the single path returned from your original query with LIMIT 1.

You can toggle off the 'Connect result nodes' checkbox from the browser preferences.
