cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USQL: List the 1% slowest User Actions?

I imagined I could list the 1% slowest User Actions with the following USQL:

SELECT * from useraction where duration > percentile(duration,99)

Gives the error "Query parsing error ". Why might it be, and is there a way around it?

1 REPLY 1

ChadTurner
Leader

I think it's more-so a parsing error due to syntax. Duration is explicitly an integer value, meaning that it has to be a direct reflection of a number, not an aggregation method (even though that does result in a number). In the end it has to have a direct value to base its condition off of. This would likely work if nested statements were possible.

My recommendation at least for something similar to what you're looking to do. Alternatively you could do a custom chart for a particular user action on the 99th percentile. Average is the only aggregation method available currently for session duration. I would try to adapt the query to fit some different, but similar criteria.

Maybe try narrowing it down a bit more as well. Looking at Apdex=Frustrated sessions for a particular application and pulling a percentile or average duration as the SELECT'ed column would be a way to go about it.

-Chad