Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is more efficient to gather table statistics:

  1. Using dbms_stats.gather_table_stats?
  2. Using analyze table?
share|improve this question

migrated from stackoverflow.com Sep 21 '12 at 23:12

This question came from our site for professional and enthusiast programmers.

    
as both the functions serve the purpose of giving the row length of a table, just wanna know which one is better? – Shreyos Adikari Sep 20 '12 at 19:10
up vote 3 down vote accepted

It's not recommended to use analyze to gather statistics (from 8i onward) because CBO(cost base optimizer) is build to recognize statistics that have been gathered using dbms_stats. So dbms_stats is a preferable way to gather statistics.

share|improve this answer
    
thanks......... – Shreyos Adikari Sep 20 '12 at 19:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.