"선택도 카디널리티 Selectivity vs. Cardinality"의 두 판 사이의 차이
DB CAFE
(새 문서: == 선택도 와 카디날리티 조회 SQL == <source lang=sql> select column name , num_distinct , num_nulls , 1/num distinct selectivity , round (1/num distinct...) |
|||
5번째 줄: | 5번째 줄: | ||
, num_nulls | , num_nulls | ||
, 1/num distinct selectivity | , 1/num distinct selectivity | ||
− | , round (1/num distinct * t. | + | , round (1/num distinct * t.num_rows, 2) cardinality |
from user_tables t | from user_tables t | ||
, user tab columns c | , user tab columns c |
2023년 1월 3일 (화) 22:11 판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
선택도 와 카디날리티 조회 SQL[편집]
select column name
, num_distinct
, num_nulls
, 1/num distinct selectivity
, round (1/num distinct * t.num_rows, 2) cardinality
from user_tables t
, user tab columns c
where t.table name = :tbl
and c.table_name = t.table name
order by column id ;