Re: pro*c performance question
Date: Thu, 4 Nov 1993 21:28:41 GMT
Message-ID: <MLOENNRO.93Nov4212841_at_demo1.se.oracle.com>
ST> This is the statement that has been executed many times. As you can see we have parsed ST> the statement only once which is good news. We have executed many times (201 times) and ST> the execute time is only 8 however the fetch phase is 289. Please note that this ST> query returns one row as its result so the array processing will not solve the ST> problem here.
Is your program polling certain statistics ? If you're using Oracle7, you might consider using a database procedure to do the polling, and then distribute values with the dbms_pipe or dbms_alert package.
ST> I also talked to Oracle tech support and they think that since pseudo tables are ST> not referenced by row number in the memory it will take a long time to sort things out. ST> Also it seems like the close statement which I have still left in my code has not ST> affected the parsing phase. In other words the preprocessor has not released all ST> the cursor resources and it can still find the context in memory thus avoiding reparsing.
Point taken.
ST> According to Oracle documents the fetch phase is the phase where rows get selected ST> and sorted. Does this mean that it is the fetch phase that does most of the ST> work and not the execute phase? Anyway I will try to play with this query maybe
Without getting too technical, I think you can assume that Oracle will do all the work in the fetch-phase whenever possible. Of course there are lots of situations where this would be impossible: for example if you require the result to be sorted or need to use temporary segments (for set-operations, distinct, group by, etc). Please note that these operations might not always need temporary segments, it's hard to generalize.
ST> changing the order of things to see if there is any effect. Again if any of the ST> folks out there have any insight into this I will appreciate if they could post a ST> reply. ST> Regards, ST> <<<saeed>>>
Hope this helps,
Magnus
--
Magnus Lonnroth
Tech.Sales & Consultant
Oracle Sweden
Mail: mloennro_at_oracle.com
Received on Thu Nov 04 1993 - 22:28:41 CET