oracle 11g bootstrap$系列三

wisdomone1發表於2015-11-03

背景

  ORACLE啟動非常複雜,進入正題,繼續分析oracle mount至open的TRACE FILE。


結論

1,oracle mount到open,先讀取控制檔案,然後讀取每個資料檔案,接著讀取第1號資料檔案SYSTEM的第520資料塊,然後在這個資料塊建立字典表bootstrap$
2,接著從建立好的bootstrap$把儲存在其中的59個物件(包括表,索引,CLUSTER TABLE)全部提取出來,依次建立這59個物件
3,為何是59個物件,因為過濾了bootstrap$表本身
4,依次建立是何義呢,即指定這些59個物件是在哪個檔案,哪個資料塊,也就是說這些資料塊必須要固定在一個固定的位置,不能雖然變換了,我想是ORACLE核心程式碼固定死了
    還有一個依次的意思,就是以這59個物件obj#的編號大小,依次建立這些物件
5,建立完這些59個物件後,然後使用這些建立好的物件,查詢一些對於資料庫OPEN有關的資訊
6,當然關於建立好這59個物件,ORACLE是如何查詢這些59個物件,將在下文進行繼續學習
7,引申:bootstrap$表的定義本身就是儲存在1號資料檔案的520號資料塊


  BOOTSTRAP很特殊,它建立好後,由此引導資料庫OPEN,可見此表的核心價值與重要性
  還有重要一點,儲存這些60個物件的不管是表或是索引或CLUSTER TABLE,它們裡面儲存的資料,而非DDL,是永遠存在在1號資料檔案對應的哪些資料塊上的,不會每次都去重新插入的
  所以我判斷這60個物件的資料是在建立資料庫時就已經初始化好了


  既然這60個物件非常重要,如果你破壞了儲存這些表的資料塊,資料庫肯定會出非常嚴重的問題,當然會是什麼問題,我們還要研究


  再是,即使521,522,523這3個資料塊是儲存了60個物件的資料,如果這3個資料塊壞了,哪資料庫肯定啟不來


8,ORACLE在建立這59個底層物件所採用CREATE TABLE語法,僅適用於這些物件,不適用於普通的表物件


9,還有一點,儲存bootstrap$表定義的是在520號資料塊,而bootstrap$表儲存的內容是儲存在521,522,523這幾個資料塊,可見ORACLE設計的精妙之處


即:
CREATE CLUSTER C_OBJ#("OBJ#" NUMBER) PCTFREE 5 PCTUSED 40 INITRANS 2 MAXTRANS 255 
STORAGE (  INITIAL 136K NEXT 200K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 2 EXTENTS (FILE 1 BLOCK 144)) SIZE 800  


或者


CREATE INDEX I_OBJ# ON CLUSTER C_OBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 64K NEXT 1024K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 3 EXTENTS (FILE 1 BLOCK 168))


具體就是說objno及file和block語法不適用於普通表及索引和cluster table


9,10046 trace裡面的內容非常好,要進一步分析與理解,確實是利器


測試



摘錄有價值的TRACE FILE章節,且分析直接穿插在TRACE FILE中,這樣真觀性好,便於對比檢視。
PARSING IN CURSOR #3 len=19 dep=0 uid=0 oct=35 lid=0 tim=1446298993344797 hv=1907384048 ad='de94ab90' sqlid='a01hp0psv0rrh'
alter database open
END OF STMT
PARSE #3:c=0,e=49292,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1446298993344796
WAIT #3: nam='control file sequential read' ela= 48 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993365782 ---mount一開始,仍然是讀取控制檔案的內容
WAIT #3: nam='control file sequential read' ela= 12 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993366007
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993366031
WAIT #3: nam='rdbms ipc reply' ela= 10 from_process=10 timeout=910 p3=0 obj#=-1 tim=1446298993366703
WAIT #3: nam='rdbms ipc reply' ela= 47335 from_process=10 timeout=910 p3=0 obj#=-1 tim=1446298993414059
WAIT #3: nam='control file sequential read' ela= 9 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993414165
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993414187
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993414203
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298993414220
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='control file sequential read' ela= 0 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298993414282
WAIT #3: nam='Disk file operations I/O' ela= 0 FileOperation=2 fileno=1 filetype=2 obj#=-1 tim=1446298993414282  --到這兒,開始從資料檔案開始讀取內容,等待事件為disk file operations i/o
WAIT #3: nam='Disk file operations I/O' ela= 105 FileOperation=2 fileno=2 filetype=2 obj#=-1 tim=1446298993414389
WAIT #3: nam='Disk file operations I/O' ela= 76 FileOperation=2 fileno=3 filetype=2 obj#=-1 tim=1446298993414489
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=4 filetype=2 obj#=-1 tim=1446298993414578
WAIT #3: nam='Disk file operations I/O' ela= 72 FileOperation=2 fileno=5 filetype=2 obj#=-1 tim=1446298993414662
WAIT #3: nam='Disk file operations I/O' ela= 74 FileOperation=2 fileno=6 filetype=2 obj#=-1 tim=1446298993414751
WAIT #3: nam='Disk file operations I/O' ela= 65 FileOperation=2 fileno=7 filetype=2 obj#=-1 tim=1446298993414827
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=8 filetype=2 obj#=-1 tim=1446298993414914
WAIT #3: nam='Disk file operations I/O' ela= 75 FileOperation=2 fileno=201 filetype=2 obj#=-1 tim=1446298993415022
WAIT #3: nam='Disk file operations I/O' ela= 72 FileOperation=2 fileno=202 filetype=2 obj#=-1 tim=1446298993415107
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=23 blocks=1 obj#=-1 tim=1446298993415129  --讀取資料檔案,但注意,只是讀取每個資料檔案的第一個資料塊,大家注意看block#=1及blocks=1
WAIT #3: nam='db file sequential read' ela= 12 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993415171
WAIT #3: nam='db file sequential read' ela= 7 file#=2 block#=1 blocks=1 obj#=-1 tim=1446298993415224
WAIT #3: nam='db file sequential read' ela= 7 file#=3 block#=1 blocks=1 obj#=-1 tim=1446298993415267
WAIT #3: nam='db file sequential read' ela= 6 file#=4 block#=1 blocks=1 obj#=-1 tim=1446298993415292
WAIT #3: nam='db file sequential read' ela= 7 file#=5 block#=1 blocks=1 obj#=-1 tim=1446298993415316
WAIT #3: nam='db file sequential read' ela= 89 file#=6 block#=1 blocks=1 obj#=-1 tim=1446298993415418
WAIT #3: nam='db file sequential read' ela= 61 file#=7 block#=1 blocks=1 obj#=-1 tim=1446298993415698
WAIT #3: nam='db file sequential read' ela= 17 file#=8 block#=1 blocks=1 obj#=-1 tim=1446298993415812
WAIT #3: nam='control file parallel write' ela= 384 files=2 block#=17 requests=2 obj#=-1 tim=1446298993416236 --接下來向控制檔案寫入內容
WAIT #3: nam='control file parallel write' ela= 390 files=2 block#=15 requests=2 obj#=-1 tim=1446298993416662
WAIT #3: nam='control file parallel write' ela= 290 files=2 block#=1 requests=2 obj#=-1 tim=1446298993416976
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993416998
WAIT #3: nam='rdbms ipc reply' ela= 12851 from_process=10 timeout=2147483647 p3=0 obj#=-1 tim=1446298993430071 --和DBWR程式互動通訊,大家注意看from_process=10
WAIT #3: nam='control file sequential read' ela= 10 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993430171 --接著又是讀取控制檔案
WAIT #3: nam='control file sequential read' ela= 6 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993430197
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=15 blocks=1 obj#=-1 tim=1446298993430214
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=17 blocks=1 obj#=-1 tim=1446298993430230
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=322 blocks=1 obj#=-1 tim=1446298993430256
WAIT #3: nam='control file parallel write' ela= 387 files=2 block#=321 requests=2 obj#=-1 tim=1446298993430661 --繼續寫入控制檔案
WAIT #3: nam='control file parallel write' ela= 329 files=2 block#=18 requests=2 obj#=-1 tim=1446298993431025
WAIT #3: nam='control file parallel write' ela= 249 files=2 block#=16 requests=2 obj#=-1 tim=1446298993431302
WAIT #3: nam='control file parallel write' ela= 264 files=2 block#=1 requests=2 obj#=-1 tim=1446298993431590
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993431611  --讀取控制檔案
WAIT #3: nam='control file sequential read' ela= 17 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452234
WAIT #3: nam='control file sequential read' ela= 6 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993452296
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452315
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452331
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452379
WAIT #3: nam='control file sequential read' ela= 4 file#=1 block#=1 blocks=1 obj#=-1 tim=1446298993452399
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452413
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452427
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=19 blocks=1 obj#=-1 tim=1446298993452446
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298993452474
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298993452490
WAIT #3: nam='control file sequential read' ela= 3 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298993452504


*** 2015-10-31 09:43:14.681
WAIT #3: nam='rdbms ipc reply' ela= 1229042 from_process=11 timeout=1800 p3=0 obj#=-1 tim=1446298994681801 --與LGWR進行通訊
WAIT #3: nam='control file sequential read' ela= 13 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705023 --讀取控制檔案
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705064
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705081
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705098
WAIT #3: nam='control file sequential read' ela= 5 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705126
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705142
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705156
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705172
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994705195
WAIT #3: nam='control file sequential read' ela= 3 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994705211
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994705225
WAIT #3: nam='control file sequential read' ela= 4 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994705239
WAIT #3: nam='log file sync' ela= 45112 buffer#=9208 sync scn=61122263 p3=0 obj#=-1 tim=1446298994774045 --LOG FILE SYNC,也就是在MOUNT到OPEN會產生REDO
WAIT #3: nam='control file sequential read' ela= 11 file#=0 block#=1 blocks=1 obj#=-1 tim=1446298994774134  --讀取控制檔案
WAIT #3: nam='control file sequential read' ela= 6 file#=0 block#=16 blocks=1 obj#=-1 tim=1446298994774158
WAIT #3: nam='control file sequential read' ela= 7 file#=0 block#=18 blocks=1 obj#=-1 tim=1446298994774176
WAIT #3: nam='control file sequential read' ela= 10 file#=0 block#=281 blocks=1 obj#=-1 tim=1446298994774210
WAIT #3: nam='instance state change' ela= 342 layer=2 value=1 waited=1 obj#=-1 tim=1446298994774606  ---一個新的等待事件,instance state change
WAIT #3: nam='db file sequential read' ela= 11825 file#=1 block#=520 blocks=1 obj#=-1 tim=1446298994848351 ---這個點很重要,大家是:讀取資料檔案,是讀哪個資料檔案呢,是1號檔案,即SYSTEM資料檔案,哪個資料塊呢,是520號資料塊,
---這個520資料塊是什麼含義呢,別急往下看
=====================


---看到沒有,馬上就建立一個bootstrap$底層字典表,並且它是儲存在file1 block 520,看到沒有,這下就結合起來了,也就是說上面是讀取這個bootstap$的
PARSING IN CURSOR #2 len=188 dep=1 uid=0 oct=1 lid=0 tim=1446298994978793 hv=4006182593 ad='de930258' sqlid='32r4f1brckzq1'
create table bootstrap$ ( line#         number not null,   obj#           number not null,   sql_text   varchar2(4000) not null)   storage (initial 50K objno 59 extents (file 1 block 520))
END OF STMT
PARSE #2:c=2000,e=37913,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298994978791
EXEC #2:c=0,e=885,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298994979760
CLOSE #2:c=0,e=9,dep=1,type=0,tim=1446298994979890




--我們接著向下看,ORACLE又執行了一個SQL,這個SQL很有意思,它是從上面剛剛建立的bootstrap$表查詢一條記錄,那麼它是查哪個物件?
PARSING IN CURSOR #2 len=55 dep=1 uid=0 oct=3 lid=0 tim=1446298995008810 hv=2111436465 ad='de92f758' sqlid='6apq2rjyxmxpj'
select line#, sql_text from bootstrap$ where obj# != :1
END OF STMT
PARSE #2:c=0,e=28900,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995008808
BINDS #2:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=2b1daf8d5988  bln=22  avl=02  flg=05
  value=59  ---大家別急,看這兒,59號物件,從我本系列文章可知,59號物件就是bootstrap$,也就是說它要查不等於59號物件的所有儲存在bootstrap$中的儲存內容(大家注意:where obj#!=:1)
EXEC #2:c=2000,e=62029,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=867914364,tim=1446298995070966
WAIT #2: nam='db file sequential read' ela= 37 file#=1 block#=520 blocks=1 obj#=59 tim=1446298995081750 ---接著讀取59號物件即bootstrap$表


*** 2015-10-31 09:43:15.209
WAIT #2: nam='db file scattered read' ela= 29786 file#=1 block#=521 blocks=3 obj#=59 tim=1446298995209116  ---這裡是個多塊讀,開始從521資料塊讀,一直連續讀3個塊,把這幾個資料塊中儲存的資料提取出來


可見多塊讀其實就是把儲存在bootstrap$中的所有60個底層字典的資料全提取出來
SQL> select obj# from bootstrap$ where DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) in (521,522,523) order by 1;


      OBJ#
----------
        -1
         0
         2
         3
         4
         5
         6
         7
         8
         9
        10


      OBJ#
----------
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21


      OBJ#
----------
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32


      OBJ#
----------
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43


      OBJ#
----------
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54


      OBJ#
----------
        55
        56
        57
        58
        59


60 rows selected.




FETCH #2:c=2000,e=156618,p=4,cr=3,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227643
FETCH #2:c=0,e=63,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227814
FETCH #2:c=0,e=9,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227849
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227873
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227896
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227918
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995227940
略去類似重複內容
FETCH #2:c=0,e=9,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230000
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230025
FETCH #2:c=0,e=6,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230047
FETCH #2:c=0,e=5,p=0,cr=1,cu=0,mis=0,r=1,dep=1,og=4,plh=867914364,tim=1446298995230068
FETCH #2:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=867914364,tim=1446298995230081
STAT #2 id=1 cnt=59 pid=0 pos=1 obj=59 op='TABLE ACCESS FULL BOOTSTRAP$ (cr=61 pr=4 pw=0 time=0 us)' 
CLOSE #2:c=0,e=28,dep=1,type=0,tim=1446298995279379


根據上述提取出來的內容,建立0號物件SYSTEM ROLLBACK SEGMENT,且指定物件號objno 0,以及指定儲存在哪個檔案及哪個資料塊file 1 block 128
=====================
PARSING IN CURSOR #2 len=129 dep=1 uid=0 oct=36 lid=0 tim=1446298995279788 hv=1119914026 ad='2b1daf8915f8' sqlid='864bmh11c121a'
CREATE ROLLBACK SEGMENT SYSTEM STORAGE (  INITIAL 112K NEXT 56K MINEXTENTS 1 MAXEXTENTS 32765 OBJNO 0 EXTENTS (FILE 1 BLOCK 128))
END OF STMT
PARSE #2:c=0,e=391,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995279787
EXEC #2:c=0,e=29456,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995309292
CLOSE #2:c=0,e=49,dep=1,type=0,tim=1446298995309496
=====================


同上道理,建立2號物件c_obj# cluster table
PARSING IN CURSOR #2 len=209 dep=1 uid=0 oct=4 lid=0 tim=1446298995310005 hv=1323908363 ad='2b1daf8915a8' sqlid='7j058yj7fkg8b'
CREATE CLUSTER C_OBJ#("OBJ#" NUMBER) PCTFREE 5 PCTUSED 40 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 136K NEXT 200K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 2 EXTENTS (FILE 1 BLOCK 144)) SIZE 800
END OF STMT
PARSE #2:c=0,e=420,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995310004
EXEC #2:c=999,e=108,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995310161
CLOSE #2:c=0,e=0,dep=1,type=0,tim=1446298995310161
=====================


同上,建立3號物件
PARSING IN CURSOR #2 len=191 dep=1 uid=0 oct=9 lid=0 tim=1446298995331381 hv=2739073813 ad='de92b7c8' sqlid='0cmnx32jn5wsp'
CREATE INDEX I_OBJ# ON CLUSTER C_OBJ# PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE (  INITIAL 64K NEXT 1024K MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 OBJNO 3 EXTENTS (FILE 1 BLOCK 168))
END OF STMT
PARSE #2:c=1000,e=21156,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=1876228229,tim=1446298995331317
EXEC #2:c=1000,e=206,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=1876228229,tim=1446298995332025
STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='INDEX BUILD UNIQUE I_OBJ# (cr=0 pr=0 pw=0 time=0 us)'
STAT #2 id=2 cnt=0 pid=1 pos=1 obj=0 op='SORT CREATE INDEX (cr=0 pr=0 pw=0 time=0 us cost=0 size=0 card=0)'
STAT #2 id=3 cnt=0 pid=2 pos=1 obj=2 op='TABLE ACCESS FULL C_OBJ# (cr=0 pr=0 pw=0 time=0 us)'
CLOSE #2:c=0,e=6,dep=1,type=0,tim=1446298995332161
=====================


建立4號物件
PARSING IN CURSOR #2 len=827 dep=1 uid=0 oct=1 lid=0 tim=1446298995354831 hv=4071397944 ad='de92a528' sqlid='gsc5dr3tat6js'
CREATE TABLE TAB$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"TS#" NUMBER NOT NULL,"FILE#" NUMBER NOT NULL,"BLOCK#" NUMBER NOT NULL,"BOBJ#" NUMBER,"TAB#" NUMBER,"COLS" NUMBER NOT NULL,"CLUCOLS" NUMBER,"PCTFREE$" NUMBER NOT NULL,"PCTUSED$" NUMBER NOT NULL,"INITRANS" NUMBER NOT NULL,"MAXTRANS" NUMBER NOT NULL,"FLAGS" NUMBER NOT NULL,"AUDIT$" VARCHAR2(38) NOT NULL,"ROWCNT" NUMBER,"BLKCNT" NUMBER,"EMPCNT" NUMBER,"AVGSPC" NUMBER,"CHNCNT" NUMBER,"AVGRLN" NUMBER,"AVGSPC_FLB" NUMBER,"FLBCNT" NUMBER,"ANALYZETIME" DATE,"SAMPLESIZE" NUMBER,"DEGREE" NUMBER,"INSTANCES" NUMBER,"INTCOLS" NUMBER NOT NULL,"KERNELCOLS" NUMBER NOT NULL,"PROPERTY" NUMBER NOT NULL,"TRIGFLAG" NUMBER,"SPARE1" NUMBER,"SPARE2" NUMBER,"SPARE3" NUMBER,"SPARE4" VARCHAR2(1000),"SPARE5" VARCHAR2(1000),"SPARE6" DATE) STORAGE (  OBJNO 4 TABNO 1) CLUSTER C_OBJ#(OBJ#)
END OF STMT
PARSE #2:c=1000,e=22655,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995354830
EXEC #2:c=0,e=251,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=0,tim=1446298995376306
CLOSE #2:c=0,e=80,dep=1,type=0,tim=1446298995376481




略去中間類似的內容


開始在已經建立好的60個底層字典表中查詢某些資訊
=====================
PARSING IN CURSOR #1 len=106 dep=1 uid=0 oct=3 lid=0 tim=1446298995983884 hv=3628073639 ad='de8f3788' sqlid='bqbdby3c400p7'
select rowcnt,blkcnt,empcnt,avgspc,chncnt,avgrln,nvl(degree,1), nvl(instances,1) from tab$ where obj# = :1
END OF STMT
PARSE #1:c=0,e=14094,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995983842
=====================
PARSING IN CURSOR #2 len=136 dep=1 uid=0 oct=3 lid=0 tim=1446298995984312 hv=2541974715 ad='de8f3098' sqlid='f8mu51fbs6x5v'
select blevel, leafcnt, distkey, lblkkey, dblkkey, clufac,        nvl(degree,1), nvl(instances,1) from ind$ where bo# = :1 and obj# = :2
END OF STMT
PARSE #2:c=0,e=341,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995984311
=====================
PARSING IN CURSOR #4 len=70 dep=1 uid=0 oct=3 lid=0 tim=1446298995987047 hv=3377894161 ad='de8f29e8' sqlid='32d4jrb4pd4sj'
select charsetid, charsetform from col$  where obj# = :1 and col# = :2
END OF STMT
PARSE #4:c=0,e=2614,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995987047
=====================
PARSING IN CURSOR #5 len=52 dep=1 uid=0 oct=3 lid=0 tim=1446298995988156 hv=429618617 ad='de8f2348' sqlid='4krwuz0ctqxdt'
select ctime, mtime, stime from obj$ where obj# = :1
END OF STMT
PARSE #5:c=1000,e=333,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,plh=0,tim=1446298995988081
BINDS #5:
 Bind#0
  oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
  oacflg=08 fl2=0001 frm=00 csi=00 siz=24 off=0
  kxsbbbfp=2b1daf8d1700  bln=22  avl=02  flg=05
  value=20

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

相關文章