Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Oracle analyze table

Posted on 2010-08-25
3
Medium Priority
?
758 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 77

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 1000 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 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

618 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