2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

29
vdh/stale_stats.sql Normal file
View File

@@ -0,0 +1,29 @@
drop table t;
create table t (x int primary key, y int);
insert into t(x, y) values (1,1);
commit;
alter table t monitoring;
analyze table t compute statistics;
insert into t(x) select rownum + 1 from all_objects;
commit;
DECLARE
l_objlist dbms_stats.objecttab;
BEGIN
dbms_stats.gather_schema_Stats
(
ownname => USER,
options => 'LIST STALE',
objlist => l_objlist
);
dbms_output.put_line('going to output all stale objects: ');
for i in 1 .. l_objlist.count loop
dbms_output.put_line('objtype ' || i || ': ' || l_objlist(i).objtype);
dbms_output.put_line('objname ' || i || ': ' || l_objlist(i).objname);
end loop;
END;
/