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

USQL Query Limits Number of Results



I am currently working with a client to make an API call to return all user sessions for their application in a given time window. For an example, I wanted to return the start time for each user session during the time window. However, the result seems to be limited to 50 rows. This is less than the actual number of sessions in that time window (there were 217 sessions for this application during that time). From checking the USQL documentation, the result limit for a USQL query should be 5000, and I verified that the extrapolationLevel value is 1 in the result, so I'm unsure what the cause could be. Does anyone know how to fix this or what the problem could be?

The USQL query is as follows (note that Application Name is replaced by the web application's name):

SELECT startTime FROM usersession WHERE useraction.application = "Application Name"




I believe I've found the solution. I tried to add LIMIT 5000 at the end of my query and I got the correct amount of results as long as my limit was larger than the number of results. I haven't found documentation of this anywhere on Dynatrace's API documentation, can anyone confirm this is correct? Why would there be an implicit LIMIT 50 on every query result unless a different limit is set?

Dynatrace Champion
Dynatrace Champion

You are correct, add LIMIT 5000 to the end of your query or it will apply an implicit LIMIT 50.

Featured Posts