博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
管理数据块空间
阅读量:7071 次
发布时间:2019-06-28

本文共 1370 字,大约阅读时间需要 4 分钟。

使用数据块参数

1.建立对象时指定快空间参数

当建立对象时,可以使用所有块空间参数;当建立索引时,只能设置桉树pctfree和initrans,而不能指定pctused参数。

create cluster dept_emp_clu(deptno number(3))pctfree 20 pctused 40 initrans 4;create table department (deptno number(2),dname varchar2(10))pctfree 20 pctused 40 initrans 4;create index pk_deptno on department(deptno)pctfree 20 initrans 4;

2.改变对象块空间参数

在建立数据库对象之后,如果块空间参数不适合,那么用户可以使用alter命令修改块空间参数。但要注意,索引的pctfree参数不能修改。

alter cluster dept_emp_clu pctfree 30 pctused 40 initrans 4;alter table department pctfree 30 pctused 40 initrans 4;alter index pk_deptno initrans 4;

显示块空间参数

3.显示簇的块空间参数

通过查询动态性能视图dba_clusters,可以取得簇的块空间参数。

select pct_free ,pct_used,ini_trans,max_trans from dba_clusterswhere owner='SCOTT' and cluster_name='DEPT_EMP_CLU';

PCT_FREE PCT_USED INI_TRANS MAX_TRANS
---------- ---------- ---------- ----------
30 4 255

4.显示查询表的空间参数

通过查询动态性能视图dba_tables,可以取得表块空间参数。

select pct_free,pct_used,ini_trans,max_trans from dba_tableswhere owner='SCOTT' and table_name='DEPARTMENT';

PCT_FREE PCT_USED INI_TRANS MAX_TRANS
---------- ---------- ---------- ----------
30 4 255

5.显示索引的块空间参数

通过查询动态性能视图dba_indexes,可以取得索引的块空间参数。

select pct_free,ini_trans,max_trans from dba_indexeswhere owner='SCOTT' and index_name='PK_DEPTNO';

PCT_FREE INI_TRANS MAX_TRANS

---------- ---------- ----------
20 4 255


 

 

转载于:https://www.cnblogs.com/zhaojiedi1992/archive/2013/05/27/oracle11g_sql_0058.html

你可能感兴趣的文章
ViewPage控件
查看>>
实现SPF垃圾邮件防护功能
查看>>
Slave IO: Yes Slave SQL: No Seconds Behind Mast...
查看>>
eclipse 使用Maven deploy命令部署构建到Nexus上
查看>>
大型系统中使用JMS优化技巧–Sun OpenMQ
查看>>
滑动特效插件 - Swiper
查看>>
Oracle的TX锁(行级锁、事务锁)
查看>>
思达报表工具Style Report基础教程—用选择树进行图表的钻取
查看>>
JQuery empty selector
查看>>
Direct vs non-direct ByteBuffer
查看>>
SQLSERVER——Log Explorer 数据恢复
查看>>
oracle job最简单创建代码
查看>>
常识 跳转读取js函数
查看>>
Linux内核中的jiffies及其作用介绍及jiffies等相关函数详解
查看>>
Unity3D 事件处理函数
查看>>
unix编程高级io之epool
查看>>
linux系统硬件配置查看方法
查看>>
[转]PHP函数的实现原理及性能分析
查看>>
格式化数字
查看>>
linux 硬链接 软连接
查看>>