Re: Strange cost difference
Date: Thu, 17 Feb 2011 23:02:14 +0000 (UTC)
On Thu, 17 Feb 2011 22:34:02 +0000, Mladen Gogala wrote:
> The question is why does oracle think that this statement will return 15
I figured it out. The recursive CTE has 2 parts: the initial and the recursive part. The part of the 1st statement which says
"select empno,mgr,1 from emp where empno=7839"
plays the same role as the "start with empnp=7839" part of the "connect by" version, but is apparently executed separately. It seems to me that the good, old "connect by" stuff is still preferred by Oracle.Received on Thu Feb 17 2011 - 17:02:14 CST