Skip to Main Content

Oracle Developer Tools for VS Code

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

I Found a little problem of SQL monitor feature in VS Code Extension

nmmmgMar 25 2024 — edited Mar 25 2024

Hello

I was testing the features of Oracle Developer Tools for VS Code (SQL and PLSQL) and found a minor problem.

It occurs when using the SQL Monitor function on SQL with the /*+ leading */ hint.

For example, I would like to use the SQL Monitor feature for the query below.
select /*+ leading(e2 e1 e3 e4) use_nl(e1) */
e1.mgr, e2.empno, e3.ename, e4.deptno, sum(e2.sal + e3.sal + e4.sal) as total_sal
from emp e1, emp2 e2, emp3 e3, emp4 e4
where e1.empno = e2.empno
and e2.empno = e3.empno
and e3.empno = e4.empno
group by e1.mgr, e2.empno, e3.ename, e4.deptno;

Run the SQL Monitor function. (Ctrl + Alt + R)
When you check the SQL Monitor results, existing hints (leading etc..) will be invalidated due to the added "Monitor" hint.
select /*+Monitor*/ /*+ leading(e2 e1 e3 e4) use_nl(e1) */
e1.mgr, e2.empno, e3.ename, e4.deptno, sum(e2.sal + e3.sal + e4.sal) as total_sal
from emp e1, emp2 e2, emp3 e3, emp4 e4
where e1.empno = e2.empno
and e2.empno = e3.empno
and e3.empno = e4.empno
group by e1.mgr, e2.empno, e3.ename, e4.deptno;

Due to this phenomenon, the execution plan changes, and the SQL execution plan I want cannot be properly analyzed.

I would appreciate it if you could fix this issue.

Thank you.

This post has been answered by Christian.Shay -Oracle on Mar 26 2024
Jump to Answer
Comments
Post Details
Added on Mar 25 2024
3 comments
113 views