Re: function returning object type and print the attributes

From: Ls Cheng <exriscer_at_gmail.com>
Date: Mon, 18 Jul 2016 15:26:44 +0200
Message-ID: <CAJ2-Qb8+HH0u4aQGXG4NGBPTfYPYqFvqY_9H2-VS7HrHPwacpw_at_mail.gmail.com>



Hi

Running 11.2.0.4 Linux x86_64

I am sure it does 3 calls, the insert into t1 inserted 3 rows I think whenever an object attribute is referenced the function is called. If we use rownum (which forces inlinve view materialization) it is another extra call, so 1 + 2.

Thanks

On Mon, Jul 18, 2016 at 3:24 PM, Sayan Malakshinov <xt.and.r_at_gmail.com> wrote:

> What's your oracle version? Are you sure about 3 calls? Maybe first 2
> calls from previous test?
>
> Best regards,
> Sayan Malakshinov
> http://orasql.org
>
> On Jul 18, 2016 16:19, "Ls Cheng" <exriscer_at_gmail.com> wrote:
>
>> ops it's getting worse, the function is now called 3 times instead of
>> 2....
>>
>> TIA
>>
>>
>> On Mon, Jul 18, 2016 at 3:17 PM, Sayan Malakshinov <xt.and.r_at_gmail.com>
>> wrote:
>>
>>> Oops, I'm sorry, I've inserted predicate with rownum in the wrong place.
>>> Try like this:
>>>
>>> select x.z.o1,x.z.o2 from (select get_ot z from dual where rownum>0)x;
>>>
>>> --
>>> Best regards,
>>> Sayan Malakshinov
>>> http://orasql.org
>>>
>>
>>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 18 2016 - 15:26:44 CEST

Original text of this message