"Where절에 사용하는 인덱스"의 두 판 사이의 차이
DB CAFE
(새 문서: 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#= 49373...) |
|||
(같은 사용자의 중간 판 2개는 보이지 않습니다) | |||
1번째 줄: | 1번째 줄: | ||
+ | * sys.col_usage$; | ||
+ | * sys.ind_usage$; | ||
+ | <source lang=sql> | ||
select * | select * | ||
from sys.col_usage$; | from sys.col_usage$; | ||
− | + | </source> | |
+ | <source lang=sql> | ||
select * | select * | ||
from sys.ind_usage$; | from sys.ind_usage$; | ||
− | + | </source> | |
+ | <source lang=sql> | ||
select * | select * | ||
from dba_objects | from dba_objects | ||
where owner = 'TEST' | where owner = 'TEST' | ||
and object_name = 'T1'; | and object_name = 'T1'; | ||
− | + | </source> | |
+ | |||
+ | <source lang=sql> | ||
select * | select * | ||
from sys.col_usage$ | from sys.col_usage$ | ||
where obj#= 493734; | where obj#= 493734; | ||
+ | </source> | ||
− | + | == user 별 == | |
− | + | <source lang=sql> | |
select a.username, o.name oname, c.name cname, | select a.username, o.name oname, c.name cname, | ||
u.equality_preds, | u.equality_preds, | ||
21번째 줄: | 29번째 줄: | ||
u.range_preds, u.like_preds, u.null_preds, | u.range_preds, u.like_preds, u.null_preds, | ||
to_char(u.timestamp,'yyyy-mm-dd hh24:mi:ss') as when | 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 | + | from sys.col_usage$ u |
+ | , sys.obj$ o | ||
+ | , sys.col$ c | ||
+ | , all_users a | ||
where a.user_id = o.owner# | where a.user_id = o.owner# | ||
and u.obj# = o.obj# | and u.obj# = o.obj# | ||
29번째 줄: | 40번째 줄: | ||
order by a.username, o.name, c.name | order by a.username, o.name, c.name | ||
; | ; | ||
+ | </source> | ||
− | + | == User , table 별 == | |
− | + | <source lang=sql> | |
− | |||
select a.username, o.name oname, c.name cname, | select a.username, o.name oname, c.name cname, | ||
u.equality_preds, | u.equality_preds, | ||
38번째 줄: | 49번째 줄: | ||
u.range_preds, u.like_preds, u.null_preds, | u.range_preds, u.like_preds, u.null_preds, | ||
to_char(u.timestamp,'yyyy-mm-dd hh24:mi:ss') as when | 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 | + | from sys.col_usage$ u |
+ | , sys.obj$ o | ||
+ | , sys.col$ c | ||
+ | , all_users a | ||
+ | , dba_objects do | ||
where a.user_id = o.owner# | where a.user_id = o.owner# | ||
and u.obj# = o.obj# | and u.obj# = o.obj# | ||
49번째 줄: | 64번째 줄: | ||
order by a.username, o.name, c.name | order by a.username, o.name, c.name | ||
; | ; | ||
+ | </source> | ||
+ | [[category:oracle]] |
2023년 11월 8일 (수) 11:24 기준 최신판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
- 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
;