Solved

Oracle analyze table

Posted on 2010-08-25
3
737 Views
Last Modified: 2013-12-12
Hey guys how can I find when had Oracle analyze table last time. And if it is not analyzed than how can I analyze a table. Thanks for your help in advance
0
Comment
Question by:hussainkhan22
  • 2
3 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 33520541
There is a LAST_ANALYZED column in DBA_TABLES (and USER_TABLES).

There is an older analyze table command but I suggest the newer DBMS_STATs package to generate them.
0
 
LVL 5

Accepted Solution

by:
sindhuxyz earned 250 total points
ID: 33520591
ANALYZE TABLE employees COMPUTE STATISTICS;
ANALYZE INDEX employees_pk COMPUTE STATISTICS;

ANALYZE TABLE employees ESTIMATE STATISTICS SAMPLE 100 ROWS;
ANALYZE TABLE employees ESTIMATE STATISTICS SAMPLE 15 PERCENT;

Read this article for more:

http://www.oracle-base.com/articles/8i/CostBasedOptimizerAndDatabaseStatistics.php
0
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 33520662
As I mentioned before: The analyze table method is older and discouraged by Oracle.   It's best to use DBMS_STATS.

In later releases (10g and above), STATS are typically gathered automatically in the maintenance window:

http://www.dbasupport.com/oracle/ora10g/scheduler01.shtml



0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question