Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Binding Variable Benefit Across Sessions ?
"R Chin" <rchin_at_panix.com> wrote in message news:<a8kua5$52t$1_at_news.panix.com>...
> Thanks guys !
> I should have said 'ONE single DYNAMIC SQL'
>
> So if SessionA fired 'select X form TABOA where X = :w'
> and SessionB fired 'select Y form TABOA where X = :z'
>
> Now the hash_values are different, no ?
> is there gonna be a hard parse then ?
>
> robert
>
That will definitely be another hard parse. The hash values are different.
I may be wrong on this, but there is another scenario I believe that even the hash values ARE the same, there is still a hard parse. That is, the objects in the 2 SQLs although having the same names, but are actually different objects.
If user A issues: select * from emp; and user B issues the same later. But each user has its own emp. Then Oracle has to hard parse again. The SQL although is shared in a common location, the parse trees have to be stored twice in 2 different locations. The latter are usually much bigger. In that case, even if you use bind variables and the hash value is the same, your are still not sharing your SQLs. Received on Fri Apr 05 2002 - 16:17:42 CST