행위

Where절에 사용하는 인덱스

DB CAFE

thumb_up 추천메뉴 바로가기


  • sys.col_usage$;
  • sys.ind_usage$;
select *
from sys.col_usage$;
select *
from sys.ind_usage$;
select *
from dba_objects
where owner = 'TEST'
and object_name = 'T1';
select *
from sys.col_usage$
where obj#= 493734;

1 user 별[편집]

select a.username, o.name oname, c.name cname,
    u.equality_preds,
    u.equijoin_preds, u.nonequijoin_preds,
    u.range_preds, u.like_preds, u.null_preds,
    to_char(u.timestamp,'yyyy-mm-dd hh24:mi:ss') as when
from sys.col_usage$ u
   , sys.obj$ o
   , sys.col$ c
   , all_users a
where a.user_id = o.owner#
  and u.obj# = o.obj#
  and u.obj# = c.obj#
  and u.intcol# = c.col#
  and a.username = 'TEST'
  order by a.username, o.name, c.name
;

2 User , table 별[편집]

select a.username, o.name oname, c.name cname,
    u.equality_preds,
    u.equijoin_preds, u.nonequijoin_preds,
    u.range_preds, u.like_preds, u.null_preds,
    to_char(u.timestamp,'yyyy-mm-dd hh24:mi:ss') as when
from sys.col_usage$ u
   , sys.obj$ o
   , sys.col$ c
   , all_users a
   , dba_objects do
where a.user_id = o.owner#
  and u.obj# = o.obj#
  and u.obj# = c.obj#
  and u.intcol# = c.col#
  and a.username = 'TEST'
  and a.username = do.owner
  and do.object_name = 'T1'
  and DO.OBJECT_ID = O.OBJ#
  order by a.username, o.name, c.name
;