Re: function returning object type and print the attributes

  • From: Ls Cheng <exriscer@xxxxxxxxx>
  • To: Stefan Knecht <knecht.stefan@xxxxxxxxx>
  • Date: Mon, 18 Jul 2016 19:20:56 +0200

Hi

Yes, I saw the extra fetch in the trace but still I dont understand very
well. Another doubt, why the query runs against an object type behaves this
way? Why there is a call for each attribute?

The test case I posted is simple, the real object has 9 attributes and
eveyrtime it runs the function is called 9 times!

Thanks



On Mon, Jul 18, 2016 at 5:31 PM, Stefan Knecht <knecht.stefan@xxxxxxxxx>
wrote:

If you enable event 10046 you will see extra FETCH calls in the trace
file, which is sqlolus checking if there is any more data to read. That
would explain the additional and perhaps unexpected calls.

Stefan

On 18 Jul 2016 9:13 p.m., "Ls Cheng" <exriscer@xxxxxxxxx> wrote:

ok, will try that

thanks for the help but the sqlplus extra call is still a mystery for me
:-)

cheers



On Mon, Jul 18, 2016 at 4:05 PM, Sayan Malakshinov <xt.and.r@xxxxxxxxx>
wrote:

Just ignore SQL*Plus behaviour with simple SQL, test such queries within
p/sql blocks.
 "select x.z.o1,x.z.o2 from (select get_ot z from dual *where rownum>0*)x"
will work fine with Java and any other tools.



--
Best regards,
Sayan Malakshinov
Oracle performance tuning engineer
Oracle ACE Associate
http://orasql.org



Other related posts: