`
wj98127
  • 浏览: 263817 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

关于索引

阅读更多

1、创建索引

-- Create/Recreate indexes
create index ix_tablename_column on table_name(column)
  tablespace  name_SPACE
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 4M
    minextents 1
    maxextents unlimited
  );

 

2、SQL语句中利用索引排序:
select *  from table(INDEX=index_name) order by id,name;
这里需要指定ORDER BY语句才行。单独使用ORDER BY(不使用INDEX)的话,SQL不会自动使用索引,速度会很慢;

3、Oracle中,一个where里面只会用到一个索引;

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics