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.

PROFILE cannot be used within Neo4j Fabric. What are the alternatives to measure query performance?

Hi there,

I have created a sharded database using Neo4j Fabric and wanted to compare the performance of a series of queries. Ordinarily when query tuning I would use the PROFILE clause and investigate the execution plans but when I went to use it on the sharded database I recieved this error:

Neo.ClientError.Statement.SemanticError
'PROFILE' not supported in Fabric context

So, I was wondering if there was anyway to monitor query performance in Neo4j Fabric and get access to metrics such as db hits, rows processed, pagecache hits etc?

If it helps I am using Neo4j Enterprise edition, Neo4j Desktop 1.4.8 and the DBMS is using version 4.3.2. Any help would be greatly appreciated.

5 REPLIES 5

Hello
Please attach error log file and you can analyse the thing to understand the exact cause.
If not just paste it on the forum.

Thanking you
Sameer Sudhir G

Hi Sameer, thanks for getting back to me.

Sorry, but I'm not quite sure I fully understand.

The only error log file I can find is this:

Which doesn't show the error in question. I accessed this file from the Developer tab in Neo4j Browser from the active database. Which opened up what I assume is the Neo4j Desktop error log. If there is another error log file I am missing please advise where I could find this.

I have attached the query log file, as well in case that helps.:Query Log.txt (227.0 KB)

The standard query I am trying to run is:

UNWIND fabric.graphIds() AS graphId
CALL {
USE fabric.graph(graphId)
MATCH (c:Category)<-[:IN_CATEGORY]-(b:Business)<-[r:REVIEWS]-(), (b)-[:LOCATED_AT]->(a)-[:IN_CITY]->(p:City)
WHERE p.name='Boulder' AND c.name='Restaurants'
WITH count(r) AS ReviewCount, b
RETURN b.name AS Name, b.stars AS Rating, ReviewCount
ORDER BY Rating DESC, ReviewCount DESC
LIMIT 10
}
RETURN Name, Rating, ReviewCount

It works correctly but when I run:

PROFILE UNWIND fabric.graphIds() AS graphId
CALL {
USE fabric.graph(graphId)
MATCH (c:Category)<-[:IN_CATEGORY]-(b:Business)<-[r:REVIEWS]-(), (b)-[:LOCATED_AT]->(a)-[:IN_CITY]->(p:City)
WHERE p.name='Boulder' AND c.name='Restaurants'
WITH count(r) AS ReviewCount, b
RETURN b.name AS Name, b.stars AS Rating, ReviewCount
ORDER BY Rating DESC, ReviewCount DESC
LIMIT 10
}
RETURN Name, Rating, ReviewCount

It gives me the error

Again thanks for your help, I really appreciate it. Let me know if I need to provide anything else.
Rhys

Hello ballingerrw

I think its a transaction timeout issue. So either query is taking longer than necessary or it is dealing with large volume of data at one go. So please try to use sub query with Distinct keyword so that the duplicates are filtered out.
If that doesn't help then you need to fine tune the configuration as well as query for ideal timed execution.

Thanking you
G Sameer Sudhir

Hi again, Sameer.

I have just tried using the DISTINCT keyword and got the same result sadly. When you say configuration are you referring to the configuration settings of the DBMS?

Hello

Please have a look at apoc.conf file and adjust transaction timeout period to suit your needs.You will find generic configuration in neo4j file. If you have a Licensed Neo4j Desktop then you should easily find it out.

Thanking you
Sameer Sudhir G