Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-03-2020 01:15 AM
Hello
As part of my work i'm examining queries runtime (with PROFILE)
I have notices that running the same query may return varied results.
For example the following query:
<profile Match (p1:Person)-[:Participant]-(w) Where p1.name = 'Ellen Pompeo' Return w>
returned the following times (db hits + plan remained the same): 390ms, 65ms, 16ms, 26ms
I know the changes are rather small but since time is cruicle for my research i would like to know the reasons why this may occur
I am using neo4j desktop 1.2.9, database neo4j 4.0.4
tnx! Noa
09-03-2020 02:42 PM
The first time executing will nearly always take the longest, since there's often pagecache misses that need to be dealt with. Subsequent runs should be using the pagecache and should be faster.
Beyond that, remember that you're at the mercy of the OS which is running other apps besides Neo4j Desktop, there are likely many processes competing for CPU scheduling. It's likely you'll see timings in the same order of magnitude, but in a busy system (and not a dedicated server only running Neo4j) you may not see even consistency in the timings.
09-04-2020 12:30 AM
Tnx! Thought it has something to do with first execution vs. following executions.
It helps a lot knowing this!
All the sessions of the conference are now available online