19 Dec 2018 10:00 AM - last edited on 27 Apr 2021 04:09 PM by MaciejNeumann
Only first 50 rows are returned. Is there a counter or page index which can be incremented to retrieve next batch of rows?
Solved! Go to Solution.
19 Dec 2018 12:06 PM
How your query looks like? According to documentation you should be able to get up to 5000 results:
https://www.dynatrace.com/support/help/monitor/use...
See limitation seciont. Didn't you have any TOP function in query?
Regards,
Sebastian
19 Dec 2018 12:12 PM
SELECT TOP(distinct(userid),2000) from usersession where useraction.application = '<App_Name_String>' group by userid order by user id
which encodes to
userSessionQueryLanguage/table?query=SELECT%20top(distinct(userid)%2C2000)FROM%20usersession%20WHERE%20useraction.application%20%3D%20'<App_Name_String>'%20group%20by%20userid%20order%20by%20userid&startTimestamp=1545202800000&endTimestamp=1545206400000
19 Dec 2018 12:18 PM
You didn't set timeframe so I assume that it can return you users from short one. maybe this is the problem.
19 Dec 2018 12:19 PM
I did set time frame in unix timestamp
I am sure its correct and I have verified its accurate
Tried using timeframe in script as well in the api explorer
Same issue persists
19 Dec 2018 12:15 PM
even if I use
SELECT userid from usersession where useraction.application = 'App_Name_String'
OR
SELECT userid from usersession
it will still return 50 rows
No attribute in response available which could allow iterating the next batch.
19 Dec 2018 02:25 PM
Try it like this:
SELECT userid from usersession LIMIT 1000
In this query dynatrace not allow higher limit than 1000.
20 Dec 2018 07:09 AM
Cool. This works. 🙂
Thanks . Well it fetches more than 5000 at once.
20 Dec 2018 10:01 AM
I have the same problem, No matter what i set, the response is only 50 rows max in a managed solution.
We try with this kind of query:
SELECT usersession.ip, application, name, targetUrl,usersession.userId, startTime FROM useraction WHERE usersession.userType = "REAL_USER" GROUP BY usersession.ip, application, name, targetUrl,usersession.userId,startTime ORDER BY usersession.ip, startTime
To group all users by ip and application.by default it would be the last 2 hours. that's aprox at least 10k of user actions (5k per hour) but ended only showing no more than 50 user ressults.
20 Dec 2018 12:11 PM
Thanks Dante. Will give it a try.
Hope you are able to retrieve more than 50 rows now using LIMIT