Re: Slow query (only the first time)

From: joel garry <joel-garry_at_home.com>
Date: Wed, 18 May 2011 10:35:22 -0700 (PDT)
Message-ID: <629583a9-79cd-4a93-8081-94bc902f5465_at_f15g2000pro.googlegroups.com>



On May 18, 9:49 am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH..._at_demogracia.com.invalid> wrote:
> El 18/05/2011 17:40, "Álvaro G. Vicario" escribió/wrote:
>  > El 13/05/2011 18:09, joel garry escribió/wrote:
>  >> On May 13, 4:49 am, "Álvaro G. Vicario" >> <alvaro.NOSPAMTH..._at_demogracia.com.invalid> wrote:
>
>  >>
>  >> MOS Bug 4169306: ANSI JOIN GIVES BAD PLAN COMPARED TO ORACLE JOIN
>  >>
>  >> WORKAROUND:
>  >> -----------
>  >> Don't use ansi joins.
>  >>
>  >> I'm sure that's not the only one, start googling...
>
> Good point. Natural joins were introduced in Oracle 9 and Tom hates them.
>
> I've made a simple test (ansi vs oracle) and both execution plans have
> absolutely nothing in common. Curiously, the second one does not display
> figures (rows, bytes and cost are empty... :-?) From my test, it looks
> like the ANSI join does not use a single index: it's all TABLE ACCESS
> FULL :-!
>
> --
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://borrame.com
> -- Mi web de humor satinado:http://www.demogracia.com
> --

How are you getting the explain plan? From the 9.2 docs: "The NULL in the Rows column indicates that the optimizer does not have any statistics on the table." Very odd if you are looking at the same table. If what Mark suggested doesn't do the trick, you may have to 10053 trace.

I agree with Carlos, by the way. No one should be running unpatched v. 9 Oracle.

jg

--
_at_home.com is bogus.
All your nerds are belong to us.  http://comics.com/get_fuzzy/2011-05-17/
Received on Wed May 18 2011 - 12:35:22 CDT

Original text of this message