Home » RDBMS Server » Performance Tuning » How can we get statistics on a table being used 24/7 in a database
How can we get statistics on a table being used 24/7 in a database [message #266058] Sun, 09 September 2007 07:57 Go to next message
coolboy2005in
Messages: 12
Registered: July 2007
Location: Herndon
Junior Member
Hi Guys,
I am a new DBA and we have a table that is being used by various applications and users on a 24/7 basis. I have to generate statistics on that table.

I believe that we cannot use analyze command on an active table.
So how can we get this table statistics.

My environment is RHEL 3 & 4. We have both 9i & 10 g database.

Any help will be appreciated. Thanks in advance...
Re: How can we get statistics on a table being used 24/7 in a database [message #266059 is a reply to message #266058] Sun, 09 September 2007 08:01 Go to previous messageGo to next message
coolboy2005in
Messages: 12
Registered: July 2007
Location: Herndon
Junior Member
The database version is Oracle 9i R2 and Oracle 10g R1.

Re: How can we get statistics on a table being used 24/7 in a database [message #266060 is a reply to message #266058] Sun, 09 September 2007 08:02 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,

You can use
SQL>exec dbms_stats.gather_table_stats('TABLE','&table_name');


In 10g Database statistics is automatically generated.

Regards
Taj

Re: How can we get statistics on a table being used 24/7 in a database [message #266063 is a reply to message #266060] Sun, 09 September 2007 08:10 Go to previous messageGo to next message
coolboy2005in
Messages: 12
Registered: July 2007
Location: Herndon
Junior Member
Thanks Taj...

Thanks for the help.
Re: How can we get statistics on a table being used 24/7 in a database [message #266087 is a reply to message #266063] Sun, 09 September 2007 10:46 Go to previous message
mson77
Messages: 208
Registered: August 2007
Location: Brazil
Senior Member
Hello coolboy2005in,

Besides Taj information, you can also use this:

SQL> exec dbms_stats.gather_schema_stats('schema',NULL);


Regards,



mson77
Previous Topic: Instance Efficiency
Next Topic: How to identify a parse of SQL statement?
Goto Forum:
  


Current Time: Fri Dec 09 07:42:42 CST 2016

Total time taken to generate the page: 0.08414 seconds