Forum Stats

  • 3,768,297 Users
  • 2,252,772 Discussions
  • 7,874,520 Comments

Discussions

Compute Statistics after create a index

Petri BR
Petri BR Member Posts: 122
edited May 14, 2013 11:42PM in SQL & PL/SQL
Good night, I tryed it before and got no help.
So I'll try it again, because I didn't find it yet.

I have to create some indexes in a production database.

I have a doubt.
Do I need to Compute Statistics after creating indexes?
Or when I create they automatically are computed?

Thanks for any help.


The version I'm using is:
Oracle Database 10g Release 10.2.0.5.0 - 64bit Production
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
Tagged:

Answers

  • Hemant K Chitale
    Hemant K Chitale Member Posts: 15,759 Blue Diamond
    A CREATE INDEX automatically computes statistics on the Index (if you want to update Table and Column statistics, you still need to call DBMS_STATS.GATHER_TABLE_STATS --- e.g. if it is a Function Based Index, you need to update Table statistics because the FBI creates an additonal "virtual" column in the table).


    Hemant K Chitale
    Hemant K Chitale
  • sb92075
    sb92075 Member Posts: 42,196 Blue Diamond
    edited May 14, 2013 11:42PM
    Petri BR wrote:
    Good night, I tryed it before and got no help.
    So I'll try it again, because I didn't find it yet.

    I have to create some indexes in a production database.

    I have a doubt.
    Do I need to Compute Statistics after creating indexes?
    after CREATE INDEX what are the values for the index statistics?
    Or when I create they automatically are computed?
    Just look at the statistics values after issuing CREATE INDEX & answer the question yourself!
This discussion has been closed.