The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.
Thanks for the question, Sid.
Asked: September 19, 2018 - 1:53 am UTC
Last updated: September 19, 2018 - 10:44 am UTC
Version: 11.2
Viewed 1000+ times
set serveroutput off create table t1 ( c1 int ); create table t2 ( c1 int ); insert into t1 values ( 1 ); insert into t1 values ( 2 ); insert into t2 values ( 1 ); commit; select count (*) from t1 left join t2 on t1.c1 = t2.c1; select * from table(dbms_xplan.display_cursor(null, null, 'BASIC LAST')); EXPLAINED SQL STATEMENT: ------------------------ select count (*) from t1 left join t2 on t1.c1 = t2.c1 Plan hash value: 4045007133 ------------------------------------ | Id | Operation | Name | ------------------------------------ | 0 | SELECT STATEMENT | | | 1 | SORT AGGREGATE | | | 2 | HASH JOIN OUTER | | | 3 | TABLE ACCESS FULL| T1 | | 4 | TABLE ACCESS FULL| T2 | ------------------------------------ alter table t2 add primary key ( c1 ); select count (*) from t1 left join t2 on t1.c1 = t2.c1; select * from table(dbms_xplan.display_cursor(null, null, 'BASIC LAST')); EXPLAINED SQL STATEMENT: ------------------------ select count (*) from t1 left join t2 on t1.c1 = t2.c1 Plan hash value: 1634389831 ----------------------------------- | Id | Operation | Name | ----------------------------------- | 0 | SELECT STATEMENT | | | 1 | SORT AGGREGATE | | | 2 | TABLE ACCESS FULL| T1 | -----------------------------------
Rajeshwaran, Jeyabal, September 20, 2018 - 11:43 am UTC
Need more information on Administration? Check out the Administrators guide for the Oracle Database