CREATE OR REPLACE PROCEDURE halim_gather_stat_schema IS
BEGIN
DBMS_STATS.gather_schema_stats
(ownname => '&STLBAS',
options => 'GATHER',
estimate_percent => DBMS_STATS.auto_sample_size,
method_opt => 'for all columns size auto',
CASCADE => TRUE,
DEGREE => 5
);
END;
/
SELECT a.owner, a.table_name, a.avg_row_len, a.blocks, a.last_analyzed,
a.num_rows, a.tablespace_name, a.row_movement, a.sample_size
FROM all_tables a
WHERE last_analyzed IS NOT NULL AND owner = 'SCOTT'
ORDER BY a.last_analyzed DESC
select *
from dba_indexes
where owner='SCOTT'
AND
select * from all_tables
Halim is a Sr. Database Engineer/Data Architect (in Atlanta, USA) who is an Oracle certified (OCP) DBA, (OCP) Developer, Certified Cloud Architect Professional as well as OCI Autonomous DB specialist with extensive expertise in Database design, configuration, tuning, capacity planning, RAC, DG, Scripting, Python, PL/SQL etc. He achieved 16th position in worldwide first-ever PL/SQL Challenge cup playoff- http://plsql-challenge.blogspot.com/2010/07/winners-of-first-plsql-challenge.html
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
Index Usage – 21 week ago
-
-
-
-
-
-
-
-
Oracle Cloud & Third party tools3 years ago
-
-
-
Moving Sideways7 years ago
-
Upcoming Events...10 years ago
-
No comments:
Post a Comment