Reindexing versus Analyze Table
780383Sep 24 2010 — edited Sep 25 2010We have a table that has stale statistics in dba_tables. It has a last analyzed date from a few months back and the num_rows is about 38 million records off. I've told the DBA to run ANALYZE TABLE mytable COMPUTE STATISTICS against it. He says they drop and recreate the indexes every Sunday which is the same thing as analyzing the table. Is this true? That doesn't make sense. If that was the case then why are the stats off in dba_tables. The indexes that are dropped and recreated total about 7. Of the 7, one of them has an ANALYZE INDEX statement run against it. I'm just trying to understand why someone would think that reindexing a table is the same as analyzing or gatherings stats on the table. Reindexing I thought updated stats only on the individual indexes, not on the entire table. And Analyzing the table using the statement above updates the stats for the table rows and blocks, not on the indexes. Somebody please explain the difference.