Hi Team,
I ran below query to see explain plan for my view. but after completion of query execution
when i was trying to disconnect , it is asking about
connection<conection_name> has uncommited.
1:- commit changes
2:- rollback changes
3;- abort connection disconnect
which one i need to select and why this is asking, i am doing only select
i am using sql developer
query:-
explain plan for select * from viewname
select plan_table_output
from table(dbms_xplan.display());
When you create an explain plan, Oracle Database saves the information to its plan table:
set serveroutput off
explain plan for select * from dual;
select plan_table_output
from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
Plan hash value: 4017058736
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------
select plan_id, operation, options, object_name from plan_table;
PLAN_ID OPERATION OPTIONS OBJECT_NAME
564 SELECT STATEMENT
564 TABLE ACCESS FULL DUAL
These are the changes SQL Developer is asking if you want to commit/rollback.
Note that plan_table is a synonym to sys.plan_table$ (unless you've created your own...). This is a session-level temporary table (on commit preserve rows). So your data is wiped from this when you close the session regardless of whether you commit or rollback.
select owner, object_type
from dba_objects
where object_name = 'PLAN_TABLE';
OWNER OBJECT_TYPE
PUBLIC SYNONYM
select table_name, temporary, duration
from dba_tables
where table_name = 'PLAN_TABLE$';
TABLE_NAME TEMPORARY DURATION
PLAN_TABLE$ Y SYS$SESSION