Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: TKPROF Parse/Execute count
On 28 May 2004 12:05:23 -0700, boogab00_at_yahoo.com (obiru) wrote:
>Obviously there's something I don't understand about parsing. The
>following is a tkprof excerpt from a trace I did on my own sql*plus
>session. I just entered the query once, and ran it 11 times by
>entering "/" and hitting return. Does anyone know why I had 11 parses
>and 11 executes?
>
>select count(*)
>from
> dba_tables
>
>
>call count cpu elapsed disk query current
> rows
>------- ------ -------- ---------- ---------- ---------- ----------
>----------
>Parse 11 0.04 0.04 0 3 0
> 0
>Execute 11 0.00 0.00 0 0 0
> 0
>Fetch 22 1.64 1.80 11 194975 44
> 11
>------- ------ -------- ---------- ---------- ---------- ----------
>----------
>total 44 1.68 1.84 11 194978 44
> 11
>
>Misses in library cache during parse: 1
>Optimizer goal: CHOOSE
>Parsing user id: 5
That's the way sql*plus works. You have an implicit cursor which is thrown away as soon as the statement completes. Try using a REF CURSOR and you will see different behavior.
-- Sybrand Bakker, Senior Oracle DBAReceived on Sat May 29 2004 - 02:02:09 CDT