SQL> select * from v$version where rownum<2; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production SQL> select count(*) from t; COUNT(*) ---------- 1160704
//提取出使用游标信息;
SQL> select sql_text, sql_id, version_count from v$sqlarea where sql_text like 'select count(*) from t%';
SQL_TEXT SQL_ID VERSION_COUNT
------------------------------ ------------- -------------
select count(*) from t 2jkn7rpsbj64t 2
SQL> select * from table(dbms_xplan.display_cursor('2jkn7rpsbj64t',format => 'advanced', cursor_child_no => 0));
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
SQL_ID 2jkn7rpsbj64t, child number 0
-------------------------------------
select count(*) from t
Plan hash value: 2966233522
-------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
-------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | 4464 (100)| |
| 1 | SORT AGGREGATE | | 1 | | |
| 2 | TABLE ACCESS FULL| T | 1160K| 4464 (1)| 00:00:54 |
-------------------------------------------------------------------
SQL> alter table t parallel; Table altered SQL> select count(*) from t; COUNT(*) ---------- 1160704
SQL> select * from v$px_process; SERVER_NAME STATUS PID SPID SID SERIAL# ----------- --------- ---------- ------------------------ ---------- ---------- P000 AVAILABLE 25 5776 P001 AVAILABLE 26 5778
SQL> select * from v$process; PID SPID PNAME USERNAME SERIAL# PROGRAM -------- ---------- ------------------------ ----- --------------- ---------- ------------------------------- 25 5776 P000 oracle 13 oracle@oracle11g (P000) 26 5778 P001 oracle 6 oracle@oracle11g (P001) (篇幅由于原因,予以省略……) 32 rows selected
[oracle@oracle11g ~]$ ps -ef | grep oracle (篇幅由于原因,予以省略……) oracle 5700 1 0 17:29 ? 00:00:02 oraclewilson (LOCAL=NO) oracle 5723 1 0 17:33 ? 00:00:00 ora_smco_wilson oracle 5764 1 2 17:40 ? 00:00:05 oraclewilson (LOCAL=NO) oracle 5774 1 0 17:42 ? 00:00:00 oraclewilson (LOCAL=NO) oracle 5776 1 0 17:43 ? 00:00:00 ora_p000_wilson oracle 5778 1 0 17:43 ? 00:00:00 ora_p001_wilson oracle 5820 1 1 17:44 ? 00:00:00 ora_w000_wilson
SQL> select * from v$px_session; SADDR SID SERIAL# QCSID QCSERIAL# -------- ---------- ---------- ---------- ----------
SQL> col statistic for a30; SQL> select * from v$px_process_sysstat; STATISTIC VALUE ------------------------------ ---------- Servers In Use 0 Servers Available 0 Servers Started 2 Servers Shutdown 2 Servers Highwater 2 Servers Cleaned Up 0 Server Sessions 6 Memory Chunks Allocated 4 Memory Chunks Freed 0 Memory Chunks Current 4 Memory Chunks HWM 4 Buffers Allocated 30 Buffers Freed 30 Buffers Current 0 Buffers HWM 8 15 rows selected
SQL> set pagesize 10000;
SQL> select * from table(dbms_xplan.display_cursor('2jkn7rpsbj64t',format => 'advanced',cursor_child
_no => 1));
PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------------
SQL_ID 2jkn7rpsbj64t, child number 1
-------------------------------------
select count(*) from t
Plan hash value: 3126468333
----------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib
----------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | 2478 (100)| | | |
| 1 | SORT AGGREGATE | | 1 | | | | |
| 2 | PX COORDINATOR | | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | | | Q1,00 | P->S | QC (RAND)
| 4 | SORT AGGREGATE | | 1 | | | Q1,00 | PCWP |
| 5 | PX BLOCK ITERATOR | | 1160K| 2478 (1)| 00:00:30 | Q1,00 | PCWC |
|* 6 | TABLE ACCESS FULL| T | 1160K| 2478 (1)| 00:00:30 | Q1,00 | PCWP |
----------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
6 - access(:Z>=:Z AND :Z<=:Z)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有