本文发表在 rolia.net 枫下论坛Previous example is for create tablespace
example for create table
CREATE TABLE divisions
(div_no NUMBER(2),
div_name VARCHAR2(14),
location VARCHAR2(13) )
STORAGE ( INITIAL 100K NEXT 50K
MINEXTENTS 1 MAXEXTENTS 50 PCTINCREASE 5);
Oracle allocates space for the table based on the STORAGE parameter values as follows:
· The MINEXTENTS value is 1, so Oracle allocates 1 extent for the table upon creation.
· The INITIAL value is 100K, so the first extent's size is 100 kilobytes.
· If the table data grows to exceed the first extent, then Oracle allocates a second extent. The NEXT value is 50K, so the second extent's size would be 50 kilobytes.
· If the table data subsequently grows to exceed the first two extents, then Oracle allocates a third extent. The PCTINCREASE value is 5, so the calculated size of the third extent is 5% larger than the second extent, or 52.5 kilobytes. If the data block size is 2 kilobytes, then Oracle rounds this value to 52 kilobytes.
If the table data continues to grow, then Oracle allocates more extents, each 5% larger than the previous one.
· The MAXEXTENTS value is 50, so Oracle can allocate as many as 50 extents for the table.
So the extent size for this table is grow every time. The table storage extent will be set as
100k, 50k, 52.5, … 50(1+5%)**50). Oracle rounds the calculated size of each new extent to the nearest multiple of the data block size.
You can find more details from SQL refrence.更多精彩文章及讨论,请光临枫下论坛 rolia.net
example for create table
CREATE TABLE divisions
(div_no NUMBER(2),
div_name VARCHAR2(14),
location VARCHAR2(13) )
STORAGE ( INITIAL 100K NEXT 50K
MINEXTENTS 1 MAXEXTENTS 50 PCTINCREASE 5);
Oracle allocates space for the table based on the STORAGE parameter values as follows:
· The MINEXTENTS value is 1, so Oracle allocates 1 extent for the table upon creation.
· The INITIAL value is 100K, so the first extent's size is 100 kilobytes.
· If the table data grows to exceed the first extent, then Oracle allocates a second extent. The NEXT value is 50K, so the second extent's size would be 50 kilobytes.
· If the table data subsequently grows to exceed the first two extents, then Oracle allocates a third extent. The PCTINCREASE value is 5, so the calculated size of the third extent is 5% larger than the second extent, or 52.5 kilobytes. If the data block size is 2 kilobytes, then Oracle rounds this value to 52 kilobytes.
If the table data continues to grow, then Oracle allocates more extents, each 5% larger than the previous one.
· The MAXEXTENTS value is 50, so Oracle can allocate as many as 50 extents for the table.
So the extent size for this table is grow every time. The table storage extent will be set as
100k, 50k, 52.5, … 50(1+5%)**50). Oracle rounds the calculated size of each new extent to the nearest multiple of the data block size.
You can find more details from SQL refrence.更多精彩文章及讨论,请光临枫下论坛 rolia.net