Why does 10046 trace show 2 fetch operation while actually fetching 1 row?

Hi all,
As you can see below, query the query returns 1 row, but it seems fetch worked twice.
I wonder why?
Thank you.
select '1'
from
dual
call count cpu elapsed disk query current rows
Parse 1 0.00 0.01 0 0 0 0
Execute 1 0.00 0.01 0 0 0 0
Fetch 2 0.00 0.00 0 0 0 1
total 4 0.00 0.02 0 0 0 1
********************************************************************************

Because you fetched twice ...
For example:
SQL> alter session set events '10046 trace name context forever, level 8'
  2  /
Sessie is gewijzigd.
SQL> declare
  2    cursor c is select '1' from dual;
  3    r c%rowtype;
  4  begin
  5    open c;
  6    fetch c into r;
  7    while c%found
  8    loop
  9      dbms_output.put_line('in loop');
10      fetch c into r;
11    end loop;
12    close c;
13  end;
14  /
in loop
PL/SQL-procedure is geslaagd.
SQL> alter session set events '10046 trace name context off'
  2  /
Sessie is gewijzigd.The above leads to the following tkprof output:
declare
  cursor c is select '1' from dual;
  r c%rowtype;
begin
  open c;
  fetch c into r;
  while c%found
  loop
    dbms_output.put_line('in loop');
    fetch c into r;
  end loop;
  close c;
end;
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.04       0.04          0          0          0           0
Execute      1      0.00       0.00          0          0          0           1
Fetch        0      0.00       0.00          0          0          0           0
total        2      0.04       0.04          0          0          0           1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 9833
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       1        0.00          0.00
  SQL*Net message from client                     1        0.00          0.00
SELECT '1'
FROM
DUAL
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch        2      0.00       0.00          0          3          0           1
total        4      0.00       0.00          0          3          0           1
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 9833     (recursive depth: 1)
Rows     Row Source Operation
      1  TABLE ACCESS FULL DUAL
********************************************************************************Regards,
Rob.

Similar Messages

  • Put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    put movies in itunes on one computer why does it not show up when i access itunes from other computers or ipad2?

    i just purchased a file that had videos in it. i put them in the itunes library on my pc where i first downloaded them. i was able to transfer them to my other pc, a laptop, through my home network. i am now trying to get them on my mac pro desktop and my ipad2. my mac pro can see the other computers on my home network but i cannot get it to connect to them. i know the operating systems are different but was hoping i could transfer pictures and files from pc to mac this way. haven't been able to get it to work yet. the videos i am trying to get my mac to see came in a folder with both mac and pc versions. i thought if i got the videos i purchased into itunes that i would then be able to get them to my mac pro and my ipad2. i am new to mac/apple and have always been pc-centric so trying to marry it all has been difficult. i speak pc pretty well but am just learning apple. am i trying to do things that are not possible? i sure could use a knowledgable friendly soul to walk me through my issues of having pc and mac on the same network. i have been able to get all computers and ipad to print on my network. thanks.

  • Why does Apple TV show me that is takes 19 hours to play a movie

    Why does Apple TV show me that is takes 19 hours to play a movie

    The time it takes to load is dependent on your network
    What is your current connection, use speedtest.net
    Make sure DNS is set to auto
    if on wifi try Ethernet

  • HT3529 why does my email show up instead of my number

    why does my email show up instead of my number? when im using imessage..

    Try going to Settings>Messages>Receive At>Caller ID, if your email address is select here select your phone number instead.

  • Why does my iPad show no sim when turning on cellular data?

    Why does my iPad show no sim when turning on cellular data?

    Check the right and left sides of your iPad for a small hole the size of a paper clip (remove your smart cover if you have one).  If you see this, then you have the wifi + cellular model.  If you do, use a paper clip to remove the sim tray (or the sim removal tool that came with your iPad if you have it) as shown in the image below. 
    If the tray has a sim card in it, push the sim tray back in to re-seat it in the side of the iPad, then turn it on to see if the error message re-appears.  If it re-appears, take it to a Verizon store and have them give you a new sim card.
    If you have a sim tray but it is empty, you'll need to go to a Verizon store to get a sim card for it.

  • Why does my library show no content even though ATV2 can see my library?

    Why does my library show no content even though ATV2 can see my library?

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Why does the keyboard show up when i read a book in Kindle?

    why does the keyboard show up when i read a book in Kindle?
    it blocks about 1/4 of the page. but when i turn the ipad to horizontal it goes away.

    Try these basic things and see if the keyboard goes away for good.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Quit the Kindle App and restart. Go to the home screen first by tapping the home button. Quit/close open apps by e tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Why does auto fill show up sometimes on my GMail sign in page and sometimes it doesn't?

    Why does auto fill show up sometimes on my GMail sign in page and sometimes it doesn't? I am using Firefox 3.6.6 on a Windows Vista system.

    and have tried it on a mac desktop also - same problem.
    Try this on one of the Macs ...
    Open a Finder window. From the menu bar click Finder > Preferrences
    Select the General tab then select:  Show External Disks

  • Why does iCloud calendar show up askewed on Firefox?

    https://www.icloud.com/#calendar Please check out the link. Why does the calender show up incorrectly.

    it shows fine, could you provide the screenshot of that.
    Reload the webpage while bypassing the cache
    *Hold down the ''Shift'' key and click the ''Reload'' button with a left click.
    *Press ''Ctrl'' + ''F5'' or ''Ctrl'' + ''Shift'' + ''R'' (Windows and Linux)
    *Press ''Command'' + ''Shift'' + ''R'' (Mac)
    Clear the cache and the cookies from sites that cause problems.
    '''Clear the Cache''': Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    '''Remove Cookies''' from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"

  • Why does the keyboard shows up when i read a book in Kindle?

    why does the keyboard shows up when i read a book in Kindle?

    Try these basic things and see if the keyboard goes away for good.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Quit the Kindle App and restart. Go to the home screen first by tapping the home button. Quit/close open apps by e tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Why does camera roll show last photo taken even though it was trashed ?

    Why does camera roll show last photo taken even though it was sent to trash ?

    http://support.apple.com/kb/HT4486

  • Why does my iPad show all my Hotmail folders but each empty except for recently received messages?

    Why does my iPad show my Hotmail folders but each is empty except for mail received since I activated my new device?

    Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple logo. Ignore the red slider.

  • HT3529 When i send a text while using imessage to another iphone user why does my email show up on their phone instead of my number ??????

    When i send a text while using imessage to another iphone user why does my email show up on their phone instead of my number ?????? Can somebody please help me !

        cfm007,
    Welcome to our family. We want you to be able to enjoy all the services we provide and we definitely need to address this. Do you receive/make calls without problems? Are you able to receive messages with your contacts' number? Are you using iMessages? If so, go to Settings>Messages>Send&Receive>only your phone number should be enabled.
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • Why does my iPhone shows "restricted" on other people's phone when I call them?

    Why does my iPhone shows "restricted" on other people's phone when I call them?

    Lena the only previous e-mail message was on Tuesday Dec 30 which stated…..
    Lets get your Caller ID to work as it should! I will send you a private message so that we can better assist.
    This e-mail states  that another ‘private message’ presumably via e-mail would be sent/received but I haven’t received anything else from an e-mail perspective. Presumably it is just a matter of navigating through a low number of settings to get to the caller-id option.
    Thank you,
    Steve.
    Sent from Windows Mail

  • HT201412 Why does my iPhone show me a solid red screen

    Why does my iPhone show me a red screen

    What do you mean a solid red screen?
    that maybe a hardware or software issue,
    http://support.apple.com/kb/ts2802 - for hardware trouble shooting
    try to do a restart and a reset first.
    http://support.apple.com/kb/ht1430
    http://support.apple.com/kb/ht1414 - for restoring (to isolate it from being a hardware one.)

Maybe you are looking for

  • Reinstall LR5 in Adobe CC

    On 31 March I  signed up for Adobe Creative Cloud under the $9.99 monthly payment option. All went well and I downloaded PS and LR5. The LR however came up as a 30 day free trial; not what I expected or wanted. Today I reviewed the various help menus

  • Set measure to NULL for dates in the future

    Hi all I am trying to set the values of a measure to NULL in case the date is in the future. I have a time dimension and fact table. What I have so fat is the following: IIF([Date].[CalendarDetailed].CURRENTMEMBER.Name < format(now(), "yyyy-MM-dd"),

  • Need help starting wireless system at home

    Can I begin by saying I don't have a lot of dosh, so I'm trying to think of a smart way to solve a few hifi problems. I have two iPhone 4s, one Pad 2, one MacBook pro and a wireless printer I currently do not have a hifi at home, I would eventually l

  • Contact and distrubution list

    Good Day , Just one question I did migration from exchange 2003 to exchange 2010 I moved mailbox about Contact and distrubution list is moved automaticly I don't need to do somthing . Regards e

  • Changing forums

    I posted under O.S.X. It should be under Mail, Address Book. How do I change it?