OS :Red Hat Enterprise Linux Server release 6.3 (Santiago)
DB :11.2.0.4.0
设置 行的 宽度 和 页的行数
SQL> set line 233 pages 233
显示 sql 执行的时间
SQL> set timing on
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
PRD
Elapsed: 00:00:00.00
SQL>
查看执行计划
SQL> set autotrace on
SQL> /
INSTANCE_NAME
----------------
PRD
Elapsed: 00:00:00.00
Execution Plan
----------------------------------------------------------
Plan hash value: 1443624991
----------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 17 | 1 (100)| 00:00:01 |
| 1 | NESTED LOOPS | | 1 | 17 | 0 (0)| 00:00:01 |
| 2 | NESTED LOOPS | | 1 | 7 | 0 (0)| 00:00:01 |
|* 3 | FIXED TABLE FULL| X$KSUXSINST | 1 | 7 | 0 (0)| 00:00:01 |
| 4 | FIXED TABLE FULL| X$QUIESCE | 1 | | 0 (0)| 00:00:01 |
|* 5 | FIXED TABLE FULL | X$KVIT | 1 | 10 | 0 (0)| 00:00:01 |
----------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter("KS"."INST_ID"=USERENV('INSTANCE'))
5 - filter("KVITTAG"='kcbwst')
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
521 bytes sent via SQL*Net to client
488 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL> set autotrace off
标签:常用,01,set,FULL,-----------------------------------------------------------------
From: https://www.cnblogs.com/Miac/p/18155135