日期:2014-05-17  浏览次数:20959 次

建立了索引却查不到索引信息,求助
建表示建立了索引,用pl/sql developer建的
这是建立索引的sql语句
-- Create/Recreate indexes 
create unique index 时间 on FX0.CELL_A (TIME)
  tablespace SYSTEM
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );

可是我查询索引信息时却没有该索引,在sqlplus中用
select * from user_indexes where table_name='FX0.CELL_A'
查询,显示'未选定行‘。

大家帮帮忙!
索引 sql oracle

------解决方案--------------------
应该是这么查吧?FX0 是不是用户名哦。。

select * from user_indexes where table_name='CELL_A'
------解决方案--------------------
引用:
Quote: 引用:

查表你可以select * from 用户名.表名,如果是当前用户登录你也可以直接select * from 表名;
你查索引的table_name明显要的是表名,你加个用户名肯定不对
你说的很明白。
在问个问题,我在分区表CELL上建了本地分区索引,如下
-- Create/Recreate indexes 
create index FX0.LOC_TIME on FX0.CELL (TIME)
  local;

可是,我用
select index_name,table_name,partitioning_type,locality,alignment from user_part_indexes where table_name='CELL'(这句sql正确吗)
还是没有查到该索引。。
CREATE INDEX dbobjs_idx ON dbobjs (created) LOCAL
 (PARTITION dbobjs_06 TABLESPACE users,
 PARTITION dbobjs_07 TABLESPACE users
 );你建到哪个分区了呀,另外可以用all_part_indexes来查是不是你用户不对