Oracle笔记五

No.1
创建表:create table hr.employess(id number(6),hiredate DATEDEFAULT SYSDATE) tablespace one;在HR用户下创建表。
手动分配表所占的区:alter table hr.employees allocate extent (size 500k datafile 'e:\oradata\one.dbf');
非分区表的重组:alter table hr.employees move tablespace two;
截取表:truncate table hr.employees;截取表将删除表中所有的记录并释放所占用的空间,相应的索引也被截取
删除表:drop table hr.employees cascade constraints;
查询表信息:dba_tables,dba_objects
No.2
Oracle中索引分B-TREE和BITMAP,前者对于包含OR操作符的查询是低效的,适用于OLTP,后者对于包含OR操作符的查询是高效的,且适用于决策支持系统
create index hr.employees_lastfld_idx on hr.employees(lastfld) tablespace indx;
create bitmap  hr.employees_lastfld_idx on hr.employees(lastfld) tablespace indx;
分配索引:alter index orders_region_idx allocate extent(size 200k datafile 'e:\oradata\indx.dbf');
释放索引:alter index orders_region_idx deallocate unused;
重建索引:alter index orders_region_idx tablespace one;(重建索引可以将索引移到别的表空间)
删除索引:drop index orders_region_idx ;(在数据作大量装载前先删除索引之后再重建索引)
监视索引的使用:alter index orders_region_idx monitoring(unmonitoring ) usage开始(停止)监视索引使用

转载于:https://www.cnblogs.com/emily_fly/archive/2009/07/26/1531367.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值