Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: No stats, why the heck is CBO running???
> Yet a simple query to find the "next extext that wont fit" is always using
the CBO???
>
> This SQL queries DBA_TABLES and DBA_FREE_SPACE. There are NO hints in the
SQL.
>
> What the heck?
But there are hints in DBA_FREE_SPACE:
SQL> select text from dba_views where view_name = 'DBA_FREE_SPACE';
TEXT
f.length * ts.blocksize, f.length, f.file# from sys.ts$ ts, sys.fet$ f, sys.file$ fi where ts.ts# = f.ts#
ts.name, fi.file#, f.ktfbfebno, f.ktfbfeblks * ts.blocksize, f.ktfbfeblks, f.ktfbfefnofrom sys.ts$ ts, sys.x$ktfbfe f, sys.file$ fi where ts.ts# = f.ktfbfetsn
These kind of issues are one of the reasons why one should avoid putting hints inside views...
Now, when you join several unanalyzed tables with one analyzed one, CBO will be used by default and default statistics will be used for unanalyzed tables (or dynamic sampling depending on optimizer_dynamic_sampling parameter).
Tanel.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Tue Jul 20 2004 - 09:47:28 CDT
![]() |
![]() |