ORACLE 经常使用的命令工具-第四章:索引

上一篇 / 下一篇  2009-01-07 22:25:21 / 个人分类:Oracle

  • 文件版本: V1.0
  • 开发商: 本站原创
  • 文件来源: 本地
  • 界面语言: 简体中文
  • 授权方式: 免费
  • 运行平台: Win9X/Win2000/WinXP
第四章:索引 51Testing软件测试网i e%OH us+~bg

  1.creating function-based indexes51Testing软件测试网$M{.c"n)a3e|

51Testing软件测试网!Qd!K0B)?x"w

  sql> create index summit.item_quantity on summit.item(quantity-quantity_shipped);

"}(F3`#]!uil1s0 51Testing软件测试网fW h M*J j!lHXX*r

  2.create a B-tree index

$YxS)q%S^%}S9tY0

a:^E9Ls!fm0  sql> create [unique] index index_name on table_name(column,.. asc/desc) tablespace

$T[W n+z8l jX7g0 51Testing软件测试网8Q8\3?J*R \

  sql> tablespace_name [pctfree integer] [initrans integer] [maxtrans integer]

,K(K~ K)gg1Dgd(b0

G$Vh Y%VM0  sql> [logging | nologging] [nosort] storage(initial 200k next 200k pctincrease 0

&vGh5Sn:OP,E0 51Testing软件测试网%G4y?Z@9O!};?

  sql> maxextents 50);

$Gr|Oh0

q0X1sy5~e\4Q1r DqY0  3.pctfree(index)=(maximum number of rows-initial number of rows)*100/maximum number of rows

gA{R0Q;Cl @0 51Testing软件测试网zB|8T)q Cf`J

  4.creating reverse key indexes

?BV X$asP_0 51Testing软件测试网!DD9U%L%i6ba)a Qk/N/Q.h

  sql> create unique index xay_id on xay(a) reverse pctfree 30 storage(initial 200k51Testing软件测试网;wI2g l/O`y u#k

51Testing软件测试网v.YZWpK2t)_s

  sql> next 200k pctincrease 0 maxextents 50) tablespace indx;51Testing软件测试网'X1| G y1a0g-G

51Testing软件测试网2U'T9A6E w4K

  5.create bitmap index51Testing软件测试网 _wy/djCozc

ze%IFw)ym H0  sql> create bitmap index xay_id on xay(a) pctfree 30 storage( initial 200k next 200k51Testing软件测试网BD%gfH&j/ZM i

f ON3M"j:P}6|0  sql> pctincrease 0 maxextents 50) tablespace indx;51Testing软件测试网p%gEI#BJ}d

51Testing软件测试网,MKT&g&Xa_o

  6.change storage parameter of index

#z2^xQ2~zG0_ @0

CL9Iuh,\;pf(w0  sql> alter index xay_id storage (next 400k maxextents 100);51Testing软件测试网3]~U,g,V;B{~T

Am r8l p:M9iY0  7.allocating index space51Testing软件测试网6`Vp,y/g4M F8s~m

51Testing软件测试网)[3{!A @(B(a%E Ke

  sql> alter index xay_id allocate extent(size 200k datafile 'c:/oracle/index.dbf');51Testing软件测试网`%g3yTp8`(w?

G8R#z2mx%oIW Y0  8.alter index xay_id deallocate unused;

8` F9v.x5xY w3M~0

TAG: Oracle

 

评分:0

我来说两句

Open Toolbar