I am running an explain plan for a query and it only returns the following columns:
explain plan for SELECT ....
SET LINESIZE 130
SET PAGESIZE 0
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
Plan hash value: 3706016447
------------------------------------------------------------------------
| Id | Operation | Name |
------------------------------------------------------------------------
| 0 | SELECT STATEMENT | |
|* 1 | FILTER | |
| 2 | NESTED LOOPS OUTER | |
| 3 | NESTED LOOPS | |
| 4 | NESTED LOOPS | |
| 5 | NESTED LOOPS | |
| 6 | NESTED LOOPS | |
....
Why? if I try another simple query it works fine...
SQL> explain plan for select * from dba_users;
Explained.
SET LINESIZE 130
SET PAGESIZE 0
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
Plan hash value: 2145154934
-------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 137 | 37949 | 37 (0)| 00:00:01 |
| 1 | NESTED LOOPS | | 137 | 37949 | 37 (0)| 00:00:01 |
|* 2 | HASH JOIN | | 41 | 10414 | 24 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL | TS$ | 8 | 88 | 5 (0)| 00:00:01 |
|* 4 | HASH JOIN | | 41 | 9963 | 19 (0)| 00:00:01 |
| 5 | TABLE ACCESS FULL | TS$ | 8 | 88 | 5 (0)| 00:00:01 |
**UPDATE**: this seems to happen because I am using the
/*+ RULE*/
hint, how to explain with RULE hint? I need to compare it with the /*+ RULE*/
hint and without /*+ RULE*/
hint
Querying dba_users
with rule hint come with the same result:
SQL> explain plan for select /*+ RULE*/ * from dba_users;
Explained.
SQL> SET LINESIZE 130
SET PAGESIZE 0
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);SQL> SQL>
Plan hash value: 52995442
-------------------------------------------------------------------------
| Id | Operation | Name |
-------------------------------------------------------------------------
| 0 | SELECT STATEMENT | |
| 1 | MERGE JOIN OUTER | |
| 2 | SORT JOIN | |
| 3 | MERGE JOIN | |
| 4 | SORT JOIN | |
| 5 | NESTED LOOPS | |
Asked by Astora
(841 rep)
Jul 18, 2023, 05:31 PM
Last activity: Jul 23, 2023, 11:15 AM
Last activity: Jul 23, 2023, 11:15 AM