Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Analytic report timing out after 2 min

New Contributor II
New Contributor II

When i do a dry run of the below query i get back the query results right away. When i do a full run i get a warning after 2 min "Alert: Control execution is taking longer than expected. You will be notified when the result is ready" I do not get the report in downloads or email. Is there something wrong or can be updated in this query? It works in data analyser

select Date_Format(u.startdate, "%b %d %Y") as Date, u.displayname, u.firstname, u.lastname, u.employeeid, acc.customproperty5 as Email, u.title, u.location, owner as Manager, u.departmentname, u.companyname, acc.customproperty2 as AD_Username from users u INNER JOIN user_accounts ua on u.userkey = ua.userkey INNER JOIN accounts acc on acc.ACCOUNTKEY = ua.ACCOUNTKEY INNER JOIN endpoints ep on ep.ENDPOINTKEY = acc.ENDPOINTKEY where u.userkey = ua.userkey and ua.accountkey = acc.accountkey and acc.endpointkey = ep.endpointkey and ep.endpointkey in (2) and u.startdate BETWEEN Current_Date() and current_date() + interval 7 day



Use below query 

SELECT Date_format(u.startdate, "%b %d %y") AS DAT,
       acc.customproperty5                  AS Email,
       owner                                AS Manager,
       acc.customproperty2                  AS AD_Username
FROM   users u
       inner join user_accounts ua
               ON u.userkey = ua.userkey
       inner join accounts acc
               ON acc.accountkey = ua.accountkey
       inner join endpoints ep
               ON ep.endpointkey = acc.endpointkey
WHERE  u.userkey = ua.userkey
       AND ua.accountkey = acc.accountkey
       AND acc.endpointkey = ep.endpointkey
       AND ep.endpointkey IN ( 2 )
       AND u.startdate BETWEEN Current_date() AND Current_date() + interval 7

Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.