Take the 2-minute tour ×
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.

What is more efficient to gather table statistics:

  1. Using dbms_stats.gather_table_stats?
  2. Using analyze table?
share|improve this question
    
What have you tried doing to measure this so far? –  RedFilter Sep 20 '12 at 19:05
    
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
add comment

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

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

1 Answer

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
add comment

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.