Question in building the ptupdtabstats.sql
I have noticed that when the step(s) runs that calls the ptgentabstats sql script which builds the ptupdtabstats.sql script, it has quite a few duplicate entries (see below for an example). Is this a bug? Because it doesn't seem, from what I understand, that generating stats one right after the other is going to yield different results. Can someone explain what's happening here? Can I get rid of the duplicates, or are they necessary?
execute DBMS_STATS.GATHER_TABLE_STATS('SYSADM','PSMGRSHADOW', estimate_percent=> dbms_stats.auto_sample_size, method_opt=> 'FOR ALL INDEXED COLUMNS SIZE 1', DEGREE=> DBMS_STATS.DEFAULT_DEGREE, cascade=>TRUE);