The Oracle 9i optimizer uses histograms if they are available. To improve performance significantly, do NOT use histograms. Our query executions went from 45 seconds to three seconds.
In the initSID.sap file, make sure that
stats_method = E
To remove histograms, run:
'analyze table table_name estimate statistics'
on those tables that have histograms.
For DB13 UPDATESTATS, stats_method = E will ensure that NO histograms are generated.