Getting `DbHits` through nest children

(Michael McKenzie) #1

I have a snippet of code where I run a query so I can extract the DbHits for the query. My aim is to use this as a reference as I tune the queries. I am having an issue where I cannot seem to extract the "nested" DbHit values. Is there a key to accessing this?

Here is a sample of the code I am running:

 public void Option1()
        {
            using (var session = _driver.Session())
            {
                var query = session.ReadTransaction(tx =>
                {
                    var result = tx.Run("PROFILE MATCH (p:Process)-[:FIRST_STEP]->(ps_start:ProcessStep) " +
                                        "MATCH path = (ps_start)-[:NEXT_STEP*]->() " +
                                        "WITH nodes(path) AS steps " +
                                        "UNWIND steps AS step " +
                                        "RETURN step");
                    return result.Summary.Profile.DbHits;
                    //return result.Summary.Profile;
                });
                Console.WriteLine("Option 1: # of db hits = ");
                //Console.WriteLine("Query Profile: ");
                Console.WriteLine(query);
            }
        }
0 Likes