Oracle Table 创建参数说明

先看一个oracle 10g 下table 创建SQL,都是默认值:

先看一个oracle 10g 下table 创建sql,都是默认值:
create table sys.qs

username  varchar2(30 byte)                  not null,
user_id  number                              not null,
created  date                                not null

tablespace system
pctused    40
pctfree    10
initrans  1
maxtrans  255
storage    (
initial          64k
minextents      1
maxextents      unlimited
pctincrease      0
freelists        1
freelist groups  1
buffer_pool      default

logging
nocompress
nocache
noparallel
monitoring;
对于 数据字典管理(dictionary managed)和 本地化管理(local managed)的表空间,他们的参数是不同的,, 在local managed 模式下,的autoallocate和 uniform类型不同,参数也会不同。 这里使用的是local managed autoallocate类型的表空间。

一、Storage 参数说明
1. INITIAL
Specify the size of the first extent of the object. Oracle allocates space for this extent when you create the schema object. Refer to size_clause for information on that clause.
In locally managed tablespaces, Oracle uses the value of INITIAL, in conjunction with the type of local management—AUTOALLOCATE or UNIFORM—and the values of MINEXTENTS, NEXT and PCTINCREASE, to determine the initial size of the segment.
(1)With AUTOALLOCATE extent management, Oracle uses the INITIAL setting to optimize the number of extents allocated. Extents of 64K, 1M, 8M, and 64M can be allocated. During segment creation, the system chooses the greatest of these four sizes that is equal to or smaller than INITIAL, and allocates as many extents of that size as are needed to reach or exceed the INITIAL setting. For example, if you set INITIAL to 4M, then the database creates four 1M extents. But if you set INITIAL to 14M, then the database creates two 8M extents, which exceeds the INITIAL setting, rather than creating the less optimal one 8M extent plus six 1M extents.
(2)For UNIFORM extent management, the number of extents is determined from initial segment size and the uniform extent size specified at tablespace creation time. For example, in a uniform locally managed tablespace with 1M extents, if you specify an INITIAL value of 5M, then Oracle creates five 1M extents.
Consider this comparison: With AUTOALLOCATE, if you set INITAL to 72K, then the initial segment size will be 128K (greater than INITIAL)。 The database cannot allocate an extent smaller than 64K, so it must allocate two 64K extents. If you set INITIAL to 72K with a UNIFORM extent size of 24K, then the database will allocate three 24K extents to equal 72K.
In dictionary managed tablespaces, the default initial extent size is 5 blocks, and all subsequent extents are rounded to 5 blocks. If MINIMUM EXTENT was specified at tablespace creation time, then the extent sizes are rounded to the value of MINIMUM EXTENT.
— 自Oracle 9i 以后,推荐使用本地管理的表空间,不建议使用字典管理的表空间。
Restriction on INITIAL You cannot specify INITIAL in an ALTER statement.

2.  MINEXTENTS
(1)In locally managed tablespaces, Oracle Database uses the value of MINEXTENTS in conjunction with PCTINCREASE, INITIAL and NEXT to determine the initial segment size.
(2)In dictionary-managed tablespaces, specify the total number of extents to allocate when the object is created. The default and minimum value is 1, meaning that Oracle allocates only the initial extent, except for rollback segments, for which the default and minimum value is 2. The maximum value depends on your operating system.
(11)In a locally managed tablespace, MINEXTENTS is used to compute the initial amount of space allocated, which is equal to INITIAL * MINEXTENTS. Thereafter this value is set to 1, which is reflected in the DBA_SEGMENTS view.
(22)In a dictionary-managed tablespace, MINEXTENTS is simply the minimum number of extents that must be allocated to the segment.
If the MINEXTENTS value is greater than 1, then Oracle calculates the size of subsequent extents based on the values of the INITIAL, NEXT, and PCTINCREASE storage parameters.
When changing the value of MINEXTENTS by specifying it in an ALTER statement, you can reduce the value from its current value, but you cannot increase it. Resetting MINEXTENTS to a smaller value might be useful, for example, before a TRUNCATE … DROP STORAGE statement, if you want to ensure that the segment will maintain a minimum number of extents after the TRUNCATE operation.
Restrictions on MINEXTENTS
The MINEXTENTS storage parameter is subject to the following restrictions:
(11)MINEXTENTS is not applicable at the tablespace level.
(22)You cannot change the value of MINEXTENTS in an ALTER statement or for an object that resides in a locally managed tablespace.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。

发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/1882220.html

(0)
上一篇 2025年2月22日 11:29:41
下一篇 2025年2月22日 11:29:56

AD推荐 黄金广告位招租... 更多推荐

相关推荐

  • 从参数取值看Oracle OMF特性

    Oracle 10g以后,在目录结构和文件管理方面推出两个特性OFA和OMF。OFA(Oracle Flexiable Architecture)是进行目录结构约束规范 oracle 10g以后,在目录结构和文件管理方面推出两个特性ofa和…

    数据库 2025年2月23日
    100
  • Oracle Table连接方式分析

    可能出现哪些Oracle连接?记住:在Oracle中,连接顺序、可选的索引、用于排序和建立散列表的可用内存的不同都会导致不同的结果。 表连接基本知识: 1、哪张表将驱动查询(即访问的第一张表)?按照指定的路径查询,何时将访问到没一张表?可选…

    数据库 2025年2月23日
    100
  • Oracle存储结构之参数文件

    Oracle的参数文件非常之多,但最重要的当属数据库参数文件。而数据库参数文件有pfile和spfile两类。pfile需手动修改,是文本文件 Oracle的参数文件非常之多,但最重要的当属数据库参数文件。而数据库参数文件有pfile和sp…

    数据库 2025年2月22日
    100
  • Oracle参数及参数文件spfile/pfile详解

    Oracle参数及参数文件spfile/pfile详解,关于glogin.sql脚本的说明在启动sqlplus 时,会自动调用$ORACLE_HOME/sqlplus/admin/glo 1、参数文件v$parametersql> d…

    数据库 2025年2月22日
    100
  • Oracle sqlplus prelim 参数介绍

    从Oracle10g开始,sqlplus提供了一个参数选项-prelim,用这个参数,在系统已经hang的时候。我们可以连接到SGA而不是数据库,也就 从Oracle10g开始,sqlplus提供了一个参数选项-prelim,用这个参数,在…

    数据库 2025年2月22日
    100
  • Linux中与Oracle相关的参数

    在安装oracle 11g中,下面的参数值要在linux中指定,挑选其中的三个来说明一下。其余的由于暂时遇不到,所以先不写了。 在安装oracle 11g中,下面的参数值要在linux中指定,挑选其中的三个来说明一下。其余的由于暂时遇不到,…

    数据库 2025年2月22日
    100
  • Linux 下 Oracle 内核参数优化

    数据库的性能优化涉及到整个数据库运行环境的方方面面,诸如操作系统,Oracle自身,存储,网络等等几个大块。而操作系统则是Orac 数据库的性能优化涉及到整个数据库运行环境的方方面面,诸如操作系统,oracle自身,存储,网络等等几个大块。…

    数据库 2025年2月22日
    100
  • Oracle 数据块优化参数

    Oracle自动管理块空闲空间的条件:当一个插入或者更新操作的行在一个数据块中有足够空闲空间,并且这个空闲空间碎片状态,无法满   用于数据块优化的两个参数:pctfree和pctused一般都是用在oltp系统当中。两者并没有相互的关系,…

    数据库 2025年2月22日
    100
  • Oracle 并行相关的初始化参数

    Oracle数据库并行操作,特别是在RAC环境,一定程度上能够提升数据库的性能,所以对相关的初始化参数的了解是必要的,这篇文章将根 oracle数据库并行操作,特别是在rac环境,一定程度上能够提升数据库的性能,所以对相关的初始化参数的了解…

    数据库 2025年2月22日
    100
  • Oracle db_file_mulitblock_read_count参数详解

    Oracle DB_FILE_MULTIBLOCK_READ_COUNT是Oracle比较重要的一个全局性参数,可以影响系统级别及sessioin级别。主要是用于设置最小 oracle db_file_multiblock_read_cou…

    数据库 2025年2月22日
    100

发表回复

登录后才能评论