Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: problem with slow parse of simple insert query
nordby_at_channelpoint.com wrote in message
<77jgae$qj6$1_at_nnrp1.dejanews.com>...
[snip]
>When running tkprof, ordering by elapsed times (tkprof73
>oratracefile.trc TkprofElap.prf sort=(exeela,fchela,prsela) ),
>it shows very slow elapsed times on the parse of the query.
>The subsequent 10 parses or so get gradually faster, until
>finally it gets to where it should be. Why would it take so
>long to parse the first 10, then finally get where it should be.
[snip]
Not sure why the parse gets progressively faster. I can understand why the first parse might be slow, as it has to do most of the work in looking up the tables, constraints etc. in the data dictionary, but I'd have thought all subsequent parses, provided they're executed soon afterwards, should be equally fast, now that the data dictionary info is cached.
Your best bet would be to modify your SQL to use bind variables for your insert values. That way each insert would be exactly the same and only one parse would be necessary. At the moment each insert is distinct and has to be independently parsed.
Dave.
--
Remove "nospam" from my address to reply by email
Received on Fri Jan 15 1999 - 00:16:41 CST