통계 정보 검색 sql (표, 색인, 열 - histogram)
1067 단어 ORA-DailySQL
--1、 :1, , , , , ,pctfree,pctused ,
SELECT T.TABLE_NAME,
BLOCKS, --
EMPTY_BLOCKS, --
AVG_SPACE, --
CHAIN_CNT, --
AVG_ROW_LEN, --
T.NUM_ROWS --
FROM USER_TABLES T;
--2、 1, (B-Tree ), , (clustering_factor),
SELECT T1.INDEX_NAME,
T1.INDEX_TYPE,
T1.TABLE_OWNER,
T1.TABLE_NAME,
BLEVEL, --
LEAF_BLOCKS, --
DISTINCT_KEYS, --
AVG_LEAF_BLOCKS_PER_KEY, -- KEY
AVG_DATA_BLOCKS_PER_KEY, -- KEY
CLUSTERING_FACTOR --
FROM USER_INDEXES T1;
--3、 1, , , ( ), ( ),NUll
SELECT TT.TABLE_NAME,
TT.COLUMN_NAME,
NUM_DISTINCT, -- (histogram)
NUM_BUCKETS, -- BUCKET (histogram)
HISTOGRAM, --
LOW_VALUE, --
HIGH_VALUE, --
DENSITY, -- ( )
NUM_NULLS --
FROM USER_TAB_COLUMNS TT;