Hi,
I use this OQL query in portal (<oql_view> tag )</oql_view>
SELECT UserRequest AS r WHERE r.caller_id =1 OR r.agent_id=1
UNION
SELECT UserRequest AS r JOIN Team AS t ON r.team_id=t.id JOIN lnkPersonToTeam AS l ON l.team_id=t.id WHERE l.person_id=1
UNION
SELECT UserRequest AS r2 JOIN Person AS p2 ON r2.caller_id=p2.id JOIN Person AS u11 ON p2.manager_id=u11.id WHERE p2.manager_id=1
UNION
SELECT UserRequest AS r2 JOIN Person AS p2 ON r2.agent_id=p2.id JOIN Person AS u11 ON p2.manager_id=u11.id WHERE p2.manager_id=1
I noticed after read mariadb query log that this query slow the portal performance.
Is there any solution to optimize this query?
thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I use this OQL query in portal (<oql_view> tag )</oql_view>
SELECT UserRequest AS r WHERE r.caller_id =1 OR r.agent_id=1
UNION
SELECT UserRequest AS r JOIN Team AS t ON r.team_id=t.id JOIN lnkPersonToTeam AS l ON l.team_id=t.id WHERE l.person_id=1
UNION
SELECT UserRequest AS r2 JOIN Person AS p2 ON r2.caller_id=p2.id JOIN Person AS u11 ON p2.manager_id=u11.id WHERE p2.manager_id=1
UNION
SELECT UserRequest AS r2 JOIN Person AS p2 ON r2.agent_id=p2.id JOIN Person AS u11 ON p2.manager_id=u11.id WHERE p2.manager_id=1
I noticed after read mariadb query log that this query slow the portal performance.
Is there any solution to optimize this query?
thanks.
Duplicate of https://sourceforge.net/p/itop/discussion/integrating-itop/thread/4863a7b576/?limit=25#9da5 ?