cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Why Eager operator appear after neo4j version upgrade

Ghawady
Node

I am getting the Eager operation in places that don't make sense. I have a set of queries that used to run without Eager operation with neo4j 4.2.7 but after upgrading to neo4j 4.4.8 Eager started appearing in the query profile. I initially thought it might be something with the data, but I also started a new empty instance of neo4j 4.4.8 and ran below and still got Eager operator in the profile. Why would the below query result in an Eager operation?

PROFILE UNWIND [1,2,3,4,5] as id MERGE (n:ROW {id: id}) SET n.val1=1, n.val2=2;

but below two statements don't, even though they are doing the same action?

PROFILE UNWIND [1,2,3,4,5] as id MERGE (n:ROW {id: id}) SET n.val1=1;

PROFILE UNWIND [1,2,3,4,5] as id MERGE (n:ROW {id: id}) SET n += {val1:1, val2:2};

It looks that setting one property after MERGE is fine but setting more than one will result in Eager. This behaviour was not there in older versions. Is this intentional or a bug?

3 REPLIES 3

I've notice the same thing.  I believe it started in 4.4.6 or 4.4.7.

Hello @Ghawady 😊

After reading the documentation about eager plan operator, I think it's normal:

  1. SET n.val1=1, n.val2=2; Here, you have two operations (one for each property) and you want them both set before continuing the query.
  2. SET n.val1=1; Here, you only have property to set so only one operation so no eager.
  3. SET n += {val1:1, val2:2}; Here, you set several properties but with one operation so no eager.

It's the only explanation I see.

Regards,
Cobra

We found out the same issue with UNWIND but from version 4.2 to 4.4.

The behaviour has changed in 4.3.0