What does the storage parameter mean when Oracle creates a table

Source: Internet
Author: User

This article explains the parameters of the storage when creating a new table in an Oracle database, using charts and examples.

Available for: Table spaces, rollback segments, tables, indexes, partitions, snapshots, snapshot logs

Parameter name Default value Minimum value Maximum Value Description
INITIAL 5 (Data block) 2 (data block) Operating system limits The size of the first extent assigned to segment, in bytes, which cannot be changed in the ALTER statement, and is created by the minimum value if the specified value is less than the minimum value.
NEXT 5 (Data block) 1 (data block) Operating system limits The size of the second extent equals the initial value of next, the next value = The previous next size multiplied by (1+pctincrease/100), and if the specified value is less than the minimum, the minimum value is created.
If you change the value of next in the ALTER statement, the next assigned extent will have the specified size, regardless of the extent size and pctincrease parameter values of the last allocation.
Minextents 1 (Extent)
Rollback segment is 2 extent
1 (Extent)
Rollback segment is 2 extent
Operating system limits Segment the number of extent allocated at the time of first creation
MAXEXTENTS Depending on the size of the data block 1 (Extent)
Rollback segment is 2 extent
Unlimited As the amount of data in segment grows, the maximum number of extent that can be allocated
Pctincrease 50%


(0% in Oracle816)
0% Operating system limits Specifies the percentage increase of the third and subsequent extent relative to the previous extent,
If Pctincrease is 0, the size of all newly added extent in segment is the same, equal to the value of next,
If Pctincrease is greater than 0, each time the value of next is computed (using the formula above),
Pctincrease cannot be a negative number.
When you create a rollback segment, you cannot specify this parameter, which is fixed to 0 in the rollback segment.
OPTIMAL ---- cannot be less than the initial allocation space for the rollback segment Operating system limits Only in relation to rollback segments, when the rollback segment grows and expands beyond the set range of this parameter, the Oracle system dynamically allocates extents as appropriate to attempt to reclaim the extent of the multiple allocations.
Freelists 1 1 Data block Size limit You can specify freelists and freelist groups parameters only in Create TABLE, CLUSTER, index.
Number of free lists in each free list group in a pattern object
FREELIST GROUPS 1 1 Depends on the number of Oracle parallel instances The number of free list groups for user-created database objects is used only with the OPS parallel server option, and one instance corresponds to one group.
Buffer_pool ---- ---- ---- Defines a default buffer pool (cache) for schema objects, all of which are stored in the specified cache and are not valid for table spaces or rollback segments.


It is recommended that the Pctincrease parameter be set to 0 to minimize fragmentation so that each extent is the same (equals next value)
Once an object is established, its initial and minextents parameters cannot be modified (minextents parameters can be modified in Oracle 816)
Any changes to next and pctincrease affect only those extent that are assigned later
When assigning a new extent, the system assigns a extent directly to the value of next,
Then use the formula: previous Next value * (1+pctincrease/100) to calculate the size of the next extent to be allocated,
The result is saved to the Next_extent column of the relevant data dictionary, which is the size of the next extent to be allocated.
  
CREATE TABLE Test (a number)
STORAGE (
INITIAL 100K
NEXT 100K
Minextents 2
MAXEXTENTS 100
Pctincrease 100);
Explain:
Initially assign two extent to the test table,
The first extent is 100K, because initial=100k;
The second extent is 100K, because next=100k;
If the data in the table grows, the third extent needs to be allocated, since Pctincrease is 100, then
A third extent is 200k=100k+100k;
A fourth extent is 400k=200k+200k.
Parameter settings can be viewed through the Data dictionary table dba_tables, All_tables, User_tables, for example:
  
Select Table_name,initial_extent,next_extent,
Min_extents,max_extents,pct_increase from User_tables;
table_name initial_extent next_extent min_extents max_extents pct_increase
---------- -------------- ----------- ----------- ----------- ------------
TEST 106496 212992 2 100 100

Transfer from http://blog.sina.com.cn/s/blog_9c5151b00102v5of.html

What does the storage parameter mean when Oracle creates a table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.