代码拉取完成,页面将自动刷新
COLUMN owner HEADING 'Owner'
COLUMN table_name HEADING 'Table Name'
COLUMN num_rows FORMAT 999,999,999,999,999 HEADING 'Total Rows'
COLUMN pct_chained_rows FORMAT 99.99 HEADING '% Chained Rows'
COLUMN avg_row_length FORMAT 999,999,999,999,999 HEADING 'Avg Row Length'
SELECT
owner owner
, table_name table_name
, num_rows num_rows
,ROUND((chain_cnt/num_rows)*100, 2) pct_chained_rows
, avg_row_len avg_row_length
FROM
(select
owner
, table_name
, chain_cnt
, num_rows
, avg_row_len
from
sys.dba_tables
where
chain_cnt is not null
and num_rows is not null
and chain_cnt > 0
and num_rows > 0
and owner != 'SYS')
UNION ALL
SELECT
table_owner owner
, table_name table_name
, num_rows num_rows
, ROUND((chain_cnt/num_rows)*100, 2) pct_chained_rows
, avg_row_len avg_row_length
FROM
(select
table_owner
, table_name
, partition_name
, chain_cnt
, num_rows
, avg_row_len
from
sys.dba_tab_partitions
where
chain_cnt is not null
and num_rows is not null
and chain_cnt > 0
and num_rows > 0
and table_owner != 'SYS') b
WHERE
(chain_cnt/num_rows)*100 > 10
order by 4 desc;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。