We have a "Month End Process" that runs once a month. It does a lot of processing on the information stored throughout the month. During this process there is a tables that gets populated with around 900,000 large records. In the code after the records are inserted there is a analyze command:
EXECUTE IMMEDIATE 'Analyze table large_table ESTIMATE statistics SAMPLE 10 PERCENT';
When I look at the statistics it looks like the analyze never happens. Does anyone have any ideas why this is not working? Could it be a permission problem? The user running the process owns the tables.