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.

What are the units in Halins Query Performance tab

Under Members -> Query Performance there are two columns called Compile (avg) and Execute (avg). What are the units for these two? I am assuming ms, but without a specified unit it is hard to tell.

1 ACCEPTED SOLUTION

It's milliseconds.

The actual query Halin is using to get that data is this:

        CALL db.stats.retrieve("QUERIES") 
        YIELD data 
        WITH 
            data.queryExecutionPlan as qep,                
            data.estimatedRows as estimatedRows,
            data.invocationSummary.invocationCount as invocationCount,
            data.invocationSummary.compileTimeInUs as compileTime,
            data.invocationSummary.executionTimeInUs as executionTime,
            data.query as query,
            data.invocations as invocations

        RETURN 
            query,
            qep, 
            invocationCount,
            compileTime.min as compileMin,
            compileTime.max as compileMax,
            compileTime.avg as compileAvg,
            executionTime.min as executeMin,
            executionTime.max as executeMax,
            executionTime.avg as executeAvg,
            estimatedRows,
            invocations
        ORDER BY query ASC

The db.stats procedures have a little bit of documentation in the built in procedure reference.

View solution in original post

3 REPLIES 3

It's milliseconds.

The actual query Halin is using to get that data is this:

        CALL db.stats.retrieve("QUERIES") 
        YIELD data 
        WITH 
            data.queryExecutionPlan as qep,                
            data.estimatedRows as estimatedRows,
            data.invocationSummary.invocationCount as invocationCount,
            data.invocationSummary.compileTimeInUs as compileTime,
            data.invocationSummary.executionTimeInUs as executionTime,
            data.query as query,
            data.invocations as invocations

        RETURN 
            query,
            qep, 
            invocationCount,
            compileTime.min as compileMin,
            compileTime.max as compileMax,
            compileTime.avg as compileAvg,
            executionTime.min as executeMin,
            executionTime.max as executeMax,
            executionTime.avg as executeAvg,
            estimatedRows,
            invocations
        ORDER BY query ASC

The db.stats procedures have a little bit of documentation in the built in procedure reference.

Thanks David. I now see that the tool tip actually states microseconds. Is that a typo?
2X_3_339213bf48461bfb598d5c2b7d1ee6a0a3b128fb.png

Let me know if you'd rather have this as an issue in the repo and I'll move it there - and thanks for creating Halin, it is very useful!

Oops. You're completely right. It's microseconds, I responded too quickly. You can actually see it in the query that I pasted, which is the right query. The results that come back from CALL db.stats.retrieve('QUERIES") even says so:

    "compileTimeInUs": {
      "max": 1388839,
      "min": 1388839,
      "avg": 1388839
    },

(Compile time in Us) -- which is sort of an ASCII-fied way of saying microsecond (µs)