# V4.4.10 set queries are taking more db hits than v4.2.5

**URL:** <https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862>\
**Category:** General\
**Tags:** migrated\
**Created:** [August 19, 2022, 11:49am UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862 "2022-08-19T11:49:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrivastave2000](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shrivastave2000/32/20165_2.png) [@shrivastave2000](https://community.neo4j.com/u/shrivastave2000)\
**Post date:** [August 19, 2022, 11:49am UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/1 "2022-08-19T11:49:14Z")

</div>

hi,

we have a sol. perfectly working on v4.2.5 but due to some reasons we have to upgrade to latest version, but after upgrading we observed that in latest version cypher queries are running slower, when we dig dive into query profiling we found out 3 thing

1. set clause are taking more db hits in latest db
2. initial match filtering is also taking extra db hits,
3. we are not sure about page-caching that is also concern in latest upgrade.

sharing plan for simple query that we have ran on both versions in 4.2.5 it's taking around 43516 db hits only, but in v4.4.10 it's around 70561 db hits.

for this simple query we saw profile

**profile match(n:commonlabelindex) where n.material\_type ='FG' set n.temp =5**

**V.4.2.5::**

 ![v4.2.5.PNG](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/5/9/59ae654777749c0d41543a8cea612cfafde68eff.png "v4.2.5.PNG")

v:4.4.10::

 ![v4.4.10.PNG](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/3/4/34057068a74b5e425c2c3b06a84026c3c7a48448.png "v4.4.10.PNG")

1. Are there any considerable limitations or considerations while migrating from older neo4j versions to version 4.4.10?
2. My graph calculation have gone slower after I started working on 4.4.10 compared to that on 4.2.5? Has anyone else experienced the same?

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [August 19, 2022, 12:43pm UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/2 "2022-08-19T12:43:15Z")

</div>

are your page cache sizes equivalent between the two environments?

[https://neo4j.com/developer/guide-performance-tuning/#\_page\_cache\_sizing](https://neo4j.com/developer/guide-performance-tuning/#_page_cache_sizing)

also, it doesn’t look like you have an index on material\_type property for commonlabelindex label. You may reduce the time for the first two boxes in the explain plans, NodeByLabelScan and Filter

---

<div class="post-metadata">

**Author:** ![shrivastave2000](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shrivastave2000/32/20165_2.png) [@shrivastave2000](https://community.neo4j.com/u/shrivastave2000)\
**Post date:** [August 19, 2022, 4:53pm UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/3 "2022-08-19T16:53:09Z")

</div>

Hi,  
yes page cache sizes are equivalent between the two environments. Also max heap size and initial\_heap\_size is also same in both.  
I know I can use index on material\_type property but I want you show you the db hit diff. when we are searching with some non index based property. you can easily see the db hit diff. there.

---

<div class="post-metadata">

**Author:** ![glilienfield](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/glilienfield/32/27534_2.png) [@glilienfield](https://community.neo4j.com/u/glilienfield)\
**Post date:** [August 19, 2022, 9:39pm UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/4 "2022-08-19T21:39:35Z")

</div>

What lead me to ask the question is the huge difference in the number of page cache hits for the node scan for each environment. It is a total of 4 pagecache hits for the previous environment, will it is over 70K for the new environment. Why such a huge difference for the same data?

---

<div class="post-metadata">

**Author:** ![shrivastave2000](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shrivastave2000/32/20165_2.png) [@shrivastave2000](https://community.neo4j.com/u/shrivastave2000)\
**Post date:** [August 22, 2022, 5:54am UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/5 "2022-08-22T05:54:19Z")

</div>

look these are my memory config for both version. I have total 32 gb ram in my system.

**db: v4.4.10**

dbms.memory.heap.initial\_size=20g  
dbms.memory.heap.max\_size=20g

# The amount of memory to use for mapping the store files.  
# The default page cache memory assumes the machine is dedicated to running  
# Neo4j, and is heuristically set to 50% of RAM minus the Java heap size.  
dbms.memory.pagecache.size=8g  
#dbms.query\_cache\_size=10000

**db: v4.2.5**

dbms.memory.heap.initial\_size=20g  
dbms.memory.heap.max\_size=20g

# The amount of memory to use for mapping the store files.  
# The default page cache memory assumes the machine is dedicated to running  
# Neo4j, and is heuristically set to 50% of RAM minus the Java heap size.  
dbms.memory.pagecache.size=8g

---

<div class="post-metadata">

**Author:** ![shrivastave2000](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shrivastave2000/32/20165_2.png) [@shrivastave2000](https://community.neo4j.com/u/shrivastave2000)\
**Post date:** [August 27, 2022, 10:36am UTC](https://community.neo4j.com/t/v4-4-10-set-queries-are-taking-more-db-hits-than-v4-2-5/59862/6 "2022-08-27T10:36:34Z")

</div>

I am still waiting for reply from [@neo4j](https://community.neo4j.com/t5/user/viewprofilepage/user-id/2064) team
