Home » RDBMS Server » Performance Tuning » gather stats
gather stats [message #336786] Tue, 29 July 2008 00:23 Go to next message
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 #336797 is a reply to message #336786] Tue, 29 July 2008 01:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Oracle version (4 decimals)?

Regards
Michel
Re: gather stats [message #336823 is a reply to message #336786] Tue, 29 July 2008 02:37 Go to previous messageGo to next message
ArvindBhope
Messages: 55
Registered: June 2008
Member
9.2.0.8 and 10.2.0.2
Re: gather stats [message #336831 is a reply to message #336823] Tue, 29 July 2008 03:19 Go to previous message
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
Previous Topic: Tuning 'LIKE' Clause
Next Topic: Stale Statisics
Goto Forum:
  


Current Time: Tue Nov 26 14:44:08 CST 2024