Parallel query & views

yxyup發表於2007-04-09
session 1

SQL> select sid from v$mystat where rownum=1;
SID
----------
18

SQL>select /*+ parallel(a,4) */ * from temp_3006;
print............
session 2
SQL> select sid,qcsid,server#,degree from v$px_session;
SID QCSID SERVER# DEGREE
---------- ---------- ---------- ----------
18 18
21 18 1 4
24 18 2 4
15 18 3 4
20 18 4 4

SQL> select sid,username,program from v$session where sid in (select sid from v$px_session where qcsid=18) order by 3;
SID USERNAME PROGRAM
---------- ------------------------------ ------------------------------
21 YXY oracle@restore (P000)
24 YXY oracle@restore (P001)
15 YXY oracle@restore (P002)
20 YXY oracle@restore (P003)
18 YXY sqlplus@restore (TNS V1-V3)
[oracle@restore ~]$ ps -ef | grep ora_p | sort | grep -v grep
oracle 2547 1 0 17:48:11 ? 0:00 ora_p000_oramdb
oracle 2549 1 0 17:48:11 ? 0:00 ora_p001_oramdb
oracle 2551 1 0 17:48:11 ? 0:00 ora_p002_oramdb
oracle 2553 1 0 17:48:11 ? 0:00 ora_p003_oramdb
oracle 10186 1 0 Mar 2 ? 1:30 ora_pmon_oramdb

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7364032/viewspace-17460/,如需轉載,請註明出處,否則將追究法律責任。

相關文章