【翻譯自mos文章】在一個使用uniform size的 本地管理的資料表空間中建立一個表,為什麼會忽略INITIAL 參數?,mosuniform

來源:互聯網
上載者:User

【翻譯自mos文章】在一個使用uniform size的 本地管理的資料表空間中建立一個表,為什麼會忽略INITIAL 參數?,mosuniform

翻譯:Why Does a Table Created in a Locally Managed Tablespace With Uniform Extents Ignore INITIAL? (文檔 ID 753662.1)

在一個使用uniform size的 本地管理的資料表空間中建立一個表,為什麼會忽略INITIAL 參數?

適用於:
Oracle Database - Enterprise Edition - Version 8.1.5.0 to 11.1.0.7 [Release 8.1.5 to 11.1]
Information in this document applies to any platform.
 Information in this document applies to any platform.

解決方案:

當在一個使用uniform size的 本地管理的資料表空間 中建立表時,建立表時指定的INITIAL EXTENT 大小,會部分的被使用(are only partially used)
分為如下的三種情況:

舉例:

create tablespace testdatafile '/u01/app/oracle/oradata/KBCOOK/test01.dbf' size 50mextent management local uniform size 1m;

該資料表空間適用於如下的三個例子。


1) 如果 INITIAL EXTENT 小於 UNIFORM size,那麼 MINEXTENTS 個數量的  UNIFORM size 被建立 (見下面的Case )

SQL> create table test_tab (col1 varchar2(2)) tablespace test storage(initial 65535 minextents 1); SQL> select bytes from dba_extents where segment_name = 'TEST_TAB' and owner = 'KBCOOK'; BYTES ---------- 1048576 1 rows selected. 

註:原文是If the INITIAL EXTENT is smaller than the UNIFORM size, then the MINEXTENTS number of extents are created

其實,我覺得“then the MINEXTENTS number of extents are created ”說的不明確,此話直譯是:那麼 MINEXTENTS 個數量的 extents 被建立。數量是有了,但誰的數量沒說。看如上sql的查詢結果,推定是:那麼 MINEXTENTS 個數量的  UNIFORM size  的extents  被建立.

為此我做了一個實驗,見下面的文章:http://blog.csdn.net/msdnchina/article/details/43836519

該實驗確認了如上的推定,即:如果 INITIAL EXTENT 小於 UNIFORM size ,那麼MINEXTENTS 個數量的  UNIFORM size的extents  被建立。


2) 如果 INITIAL EXTENT 大於 或 等於 UNIFORM size  但小於  UNIFORM size 乘以 MINEXTENTS,那麼  MINEXTENTS  個 UNIFORM size  的 extent被建立(見下面的Case )

SQL> create table test_tab (col1 varchar2(2)) tablespace test storage(initial 1m minextents 5); Table created. SQL> select bytes from dba_extents where segment_name = 'TEST_TAB' and owner = 'KBCOOK'; BYTES ---------- 1048576 1048576 1048576 1048576 1048576 5 rows selected. 

在這個例子中,INITIAL = the UNIFORM size,那麼 5個(MINEXTENTS的值) UNIFORM size 大小 的 extent被建立。

原文是:In this example, our INITIAL (1mb) is equal to the UNIFORM size and MINEXTENTS (5) will produce five 1mb extents.


3) 如果 INITIAL EXTENT 大於 UNIFORM size 乘以 MINEXTENTS,那麼最小數量個UNIFORM extents 被建立,以滿足 INITIAL EXTENT的儲存要求。(見下面的Case )
原文:
If the INITIAL EXTENT is larger than the UNIFORM size times MINEXTENTS then the minimum number of UNIFORM extents will be created to meet the storage of the INITIAL EXTENT (see Case 3 below) 

SQL> create table test_tab (col1 varchar2(2)) tablespace test storage(initial 5m minextents 2); SQL> select bytes from dba_extents where segment_name = 'TEST_TAB' and owner = 'KBCOOK'; BYTES ---------- 1048576 1048576 1048576 1048576 1048576 1048576 6 rows selected. 

 In this example, our first five 1mb extents are the INITIAL EXTENT the sixth 1mb extent is the second extent of our MINEXTENTS = 2

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.