Query execution time

How to calculate/ know the query execution time ?

@Aravind There are a few ways to go about this:

  1. AdminPortal does include query performance in the GUI.
  2. You can also pull millisecond performance from the logs but you would need to query them.
  3. Pull statistics from query performance REST endpoint Built-in Endpoints :: TigerGraph Server
  4. Use the now() function at the beginning and end of the query to capture the start and end times.

Let me know if this helps?

1 Like

Hi @Aravind

Kindly try this code:

DATETIME before;
before = now() ;

// your query goes here

print to_string(datetime_diff(now(), before)) as time;

Let me know if this works

Thanks @Jon_Herke .
Can we see query execution plan as well?

You can view the query steps in the logs however at this time there isn’t the ability to pull that data from an endpoint or the GUI. AdminPortal does have limited information on Query Performance but you most likely looking for in-depth performance on each step.