About Cypher Queries Runtime

18 views
Skip to first unread message

Daniele El-Jaick

unread,
Mar 2, 2015, 2:22:20 PM3/2/15
to ne...@googlegroups.com
Hi.

What is the better way to mesure queries runtime?
At http://localhost:7474/browser/ times vary a lot.

I tried in Java: 

long timeS = System.currentTimeMillis(); 
System.out.println(System.currentTimeMillis() - timeS + "ms");
System.out.println(resultS.dumpToString());

But does not like it works since different queries have the same runtime.

Thank you

Michael Hunger

unread,
Mar 2, 2015, 6:20:56 PM3/2/15
to ne...@googlegroups.com
You can also use bin/neo4j-shell

But in Java use:

long timeS = System.currentTimeMillis(); 
ExecutionResult result = executionEngine.execute(query, parameters)
IteratorUtil.count(result);
System.out.println(System.currentTimeMillis() - timeS + "ms");



Use Parameters !!

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages