gather stats [message #336786] |
Tue, 29 July 2008 00:23 |
ArvindBhope
Messages: 55 Registered: June 2008
|
Member |
|
|
Guys,
When shd I believe in going for gather stats other than the response of the queries is slow?
Is there any table which shows me I shd go for gather stats of a particular table ?
Thanks
|
|
|
|
|
Re: gather stats [message #336831 is a reply to message #336823] |
Tue, 29 July 2008 03:19 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
In 10.2 statistics are automatically calculated (unless you disabled the job).
You can test with the following script:
set serveroutput on size 10000 format wrapped
declare
l_objList dbms_stats.objectTab;
begin
dbms_stats.gather_schema_stats
( ownname => user,
options => 'LIST STALE',
objlist => l_objList );
for i in 1..l_objList.count loop
dbms_output.put_line (l_objList(i).objName||' - '||l_objList(i).objType);
end loop;
end;
/
Regards
Michel
|
|
|