gather stats [message #336786] |
Tue, 29 July 2008 00:23 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68678 Registered: March 2007 Location: Nanterre, France, http://...
|
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
|
|
|