18 Nov 2022 05:12 PM - last edited on 21 Nov 2022 07:51 AM by MaciejNeumann
It appears as if only the first two statements in a group of OR statements are honoured, if the result is aggregated by a GROUP BY construction.
If we use a query in USQL like the one below:
SELECT name, count(*) from useraction where usersession.userSessionId = "<SOME ID>" and usersession.userType = "REAL_USER" AND type="Load" AND (name STARTSWITH "https://some.url" OR name STARTSWITH "loading" OR name STARTSWITH "SOME TEXT" OR name STARTSWITH "Homepage") GROUP BY name
We only get results of the first two statements of four in the (...OR...) group.
If we chance the order, the outcome changes accordingly.
Which misses results, that can be seen with the plain query:
SELECT name from useraction where usersession.userSessionId = "<SOME ID>" and usersession.userType = "REAL_USER" AND type="Load" AND (name STARTSWITH "https://some.url" OR name STARTSWITH "loading" OR name STARTSWITH "SOME TEXT" OR name STARTSWITH "Homepage")
A ticket with ONE support is opened in the meantime.
21 Nov 2022 02:21 PM - last edited on 29 May 2023 09:25 AM by MaciejNeumann
Update: I am easily able to reproduce this in the Dynatrace Demo environment.
Use 4 OR options and play around in the order, and you will notice that only the first two statements are used/honored.
How to reproduce in Demo:
SELECT name, count(*) from useraction where usersession.userSessionId="REDCCUGMPRPRVIFQFCBFVUPEQBMMLCAL-0" AND (name STARTSWITH "Loading" OR name STARTSWITH "search" OR name STARTSWITH "/easytravel/rest/journeys" OR name STARTSWITH "/easytravel/rest/login") GROUP BY name
07 Dec 2022 12:24 PM
Latest One Support update:
Our lab confirmed that we retrieve only first two conditions for the name as you suggested and is currently investigating the root cause. I will update you if there is any updates.