oracle里的常用命令
第四章:索引
1.creating function-based indexes
sql> create index summit.item_quantity on summit.item(quantity-quantity_shipped);
2.create a B-tree index
sql> create [unique] index index_name on table_name(column,.. asc/desc) tablespace
sql> tablespace_name [pctfree integer] [initrans integer] [maxtrans integer]
sql> [logging | nologging] [nosort] storage(initial 200k next 200k pctincrease 0
sql> maxextents 50);
3.pctfree(index)=(maximum number of rows-initial number of rows)*100/maximum number of rows
4.creating reverse key indexes
sql> create unique index xay_id on xay(a) reverse pctfree 30 storage(initial 200k
sql> next 200k pctincrease 0 maxextents 50) tablespace indx;
5.create bitmap index
sql> create bitmap index xay_id on xay(a) pctfree 30 storage( initial 200k next 200k
sql> pctincrease 0 maxextents 50) tablespace indx;
6.change storage parameter of index
sql> alter index xay_id storage (next 400k maxextents 100);
7.allocating index space
sql> alter index xay_id allocate extent(size 200k datafile 'c:/oracle/index.dbf');
8.alter index xay_id deallocate unused;
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/semisweet/archive/2006/07/13/913741.aspx
相关文档:
ORACLE 10 学习笔记-第4课-命令。
1.commit;rollback;
2.select * from dictionary;
describe dba_users;
select * from dba_users;
select name from v$controlfile;
3.
alter database drop logfile group 3
select archiver from v$instance;
alter tablespace userdata read only;
4.
select tablespace_nam ......
1. select * from emp;
2. select empno, ename, job from emp;
3. select empno 编号, ename 姓名, job 工作 from emp;
4. select job from emp;
5. select distinct job from emp;
6. select distinct empno, job from emp;
说明:因为雇员编号不重复, 所以此时证明所有的列没有重复,所以不能消 ......
author:skate
time:2010/03/16
当系统出现性能瓶颈时,尽量较少不必要的资源消耗,最后就是平衡cpu,内存,io,network等资源,使数据库
可以稳定的运行。
oracle数据库优化的根本是
1.尽量减少资源消耗,例如优化sql,减少sql本身的资源消耗
2.如果无法进一步减少资源的消耗,那就让数据尽量靠近cpu,也就是把数据 ......
oracle命令 收藏
1. ORACLE数据库启动与关闭
1.1 打开和关闭数据库 (手工)
1.1.1 sqlplus连接
#su - oracle
#sqlplus /nolog
1.1.2 打开数据库
sql> connect sys/oracle as sysdba;
sql> startup [nomount|mount]
等待十几秒左右,当看到
oracle instances started,
databa ......