Below are the steps to re-tuning up your database;
Alter database enable restrict session;
1- Backup it firts
2- from each table alter table rebuild online
3- rebuild indexes
Analyze table using pl/slq
declare
tablename varchar2(50);
CURSOR c1 is select table_name from tabs;
BEGIN
open c1;
loop
fetch c1 into tablename;
EXIT WHEN c1%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('ANALYZE table '||tablename||' ESTIMATE STATISTICS;');
end loop;
end;
