Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: gather stats slows performance?
Ana C. Dent wrote:
> streib_at_cs.indiana.edu (Allan Streib) wrote in > news:e334e4a7.0408071154.5171332a_at_posting.google.com: > >
> > WRT the CBO vs. the RBO, which is "better"? > It depends. > It depends upon many factors. > > Maybe by using OUTLINEs you can have the best of both.
Try using the non-default setting for the "CASCADE" option of dbms_stats.gather_schema_stats(). Check to see if your indexes have any statistics (which setting CASCADE => TRUE will accomplish).
As mentioned, OUTLINES (and individual HINTS) are useful to force plan stability once you find one you like (such as the one you have under RBO).
And don't assume statistics are the only factor involved in CBO operation. More memory for sorting can cause the CBO to favor sort-based joins over other kinds, for example.
In 10g, RBO is gone anyway, so you will have no choice. But on the plus side, there are also better, more automated tools for ensuring "good" statistics.
In Metalink search for Note 199083.1, there's lot's of information including a step-by-step query tuning decision tree (Note 233112.1).
--Mark Bole Received on Sat Aug 07 2004 - 18:36:41 CDT