Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check explain plan of a nested table query?

Kinjan BhavsarJul 19 2021 — edited Jul 20 2021

Hi All,
I have a PL/SQL block in which I have used TYPE and I am querying a large table and using bulk collect storing the records into TYPE example:- tasks table so TASK_TYPE.
Then, after this, I am using this type in other queries using IN clause as the example shown below
select a1, a2 from table1 where task_id in (select t.task_id from TABLE(TASK_TYPE) t)
So, now in some cases, the query takes time and as it is a nested table, I can't see an explain plan. Is there a way I can find the explain plan of a query using nested table type? Is there a way, I can write some code in PL/SQL itself which stored the value in some table, etc?
I tried using a dummy table but that won't give me an exact idea of what exactly is happening in real time.
Thanks

This post has been answered by Jonathan Lewis on Jul 20 2021
Jump to Answer

Comments

Processing

Post Details

Added on Jul 19 2021
12 comments
1,156 views