SELECT
owner, table_name,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'INCREMENTAL') incremental,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'GRANULARITY') granularity,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'STALE_PERCENT') stale_percent,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'ESTIMATE_PERCENT') estimate_percent,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'CASCADE') cascade,
DBMS_STATS.get_prefs(pname=>'METHOD_OPT') method_opt
FROM dba_tables x
WHERE table_name
in (
select segment_name from (
select segment_name,round(sum(bytes)/(1024*1024)) mb ,round(sum(bytes)/(1024*1024*1024)) gb
from dba_segments
where owner like '<owner>'
and segment_type in ('TABLE') and segment_name not like '%$%'
group by segment_name
having round(sum(bytes)/(1024*1024*1024)) > 3
order by 3 desc
)
)
ORDER BY owner, table_name;
owner, table_name,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'INCREMENTAL') incremental,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'GRANULARITY') granularity,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'STALE_PERCENT') stale_percent,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'ESTIMATE_PERCENT') estimate_percent,
DBMS_STATS.get_prefs(ownname=>owner,tabname=>table_name,pname=>'CASCADE') cascade,
DBMS_STATS.get_prefs(pname=>'METHOD_OPT') method_opt
FROM dba_tables x
WHERE table_name
in (
select segment_name from (
select segment_name,round(sum(bytes)/(1024*1024)) mb ,round(sum(bytes)/(1024*1024*1024)) gb
from dba_segments
where owner like '<owner>'
and segment_type in ('TABLE') and segment_name not like '%$%'
group by segment_name
having round(sum(bytes)/(1024*1024*1024)) > 3
order by 3 desc
)
)
ORDER BY owner, table_name;
Komentarze
Prześlij komentarz