Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How hints affect the CBO?
Your example is not quite as contrived as you suggest. I have seen Oracle do a nested loop Cartesian join because it has PK or UK information about the first table and knows that the fts will scan only once.
Unfortunately, I have seen a nested loop FTS when Oracle calculates that the driver will return zero rows - and get it wrong ;(
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Next Seminars UK July / Sept Australia July / August Malaysia September USA (MI) November http://www.jlcomp.demon.co.uk/seminar.html Niall Litchfield wrote in message <3d218176$0$8506$ed9e5944_at_reading.news.pipex.net>...Received on Tue Jul 02 2002 - 12:48:00 CDT
>It depends on the data and the stats. The (highly contrived) example below
>illustrates this. there are no indexes on either table but the nested loops
>plan is more efficient because of the daft differences in table size.
>