I am trying to find how to find running and completed queries in CB 5.0, and came across following link. Would you recommend to use this as the best way to get these queries, and secondly to find execution timings, is says to use executionTime - which sequence to use as executionTime is present for other phases or operators -
Thanks! One more thing, trying to find execution timings for a statement, there are various sections in the json output , which says executionTime, execTime (kind of similar words) - which section shall I be looking for actually knowing the execution timing it too to execute the statement… sample output:
Am I doing something wrong here, as the output shows nothing for executionTime:
Select executionTime from system:completed_requests order by str_to_duration(executionTime) DESC limit 10 ;
[
{},
{},
{},
{},
{},
{},
{},
{},
{},
{}
]
Also, I tried:
Select *, meta().plan from system:completed_requests where str_to_duration(executionTime) > 0
order by str_to_duration(executionTime) DESC limit 10 ;
select count(*) num,
min(serviceTime) minEx, max(serviceTime) maxEx,
avg(str_to_duration(serviceTime)/1000000000) avgEx,
statement
from system:completed_requests
where phaseCounts.primaryScan is not missing
group by statement;