Hmm, I think that may include both hard and soft parses. If an application is using bind variables, then only the first execution is a hard parse, and subsequent executions are soft parses.
This page shows a (gnarly) SQL statement to show this (I think): http://www.oracle.com/technology/oramag/code/tips2005/111405.html This one looks a bit more readable: http://www.adp-gmbh.ch/ora/misc/hard_parse_vs_soft_parse.html At any rate, if this really is happening, you may want to check your Oracle config - because it shouldn't be hard parsing every statement, unless they differ, which in your case, they don't. Larry On Feb 18, 2008 3:48 AM, Thijs <[EMAIL PROTECTED]> wrote: > > Our dba pointed out to me that query's fired by ibatis are constantly being > hard parsed by oracle. > Even tough the queries that I'm using are constantly the same. An example > > <select id="get" resultMap="result" parameterClass="Filter" > cacheModel="fiot"> > SELECT > a.channel_id, > a.object_id, > a.name, > a.description > FROM IndexObject a > where a.object_id = #objectId# > and a.channel_id = #channelId# > </select> > > Which results in this oracle trace after runnning this in a loop 6 times > where objectId and channelId are different every time. I would think that > because I'm using bind variables this would not result in hard parses every > time. > > SELECT > a.channel_id, > a.object_id, > a.name, > a.description, > FROM > IndexObject a > WHERE > a.object_id = :1 > and a.channel_id = :2 > > > call count cpu elapsed disk query current > rows > ------- ------ -------- ---------- ---------- ---------- ---------- > ---------- > Parse 6 0.00 0.02 0 0 0 > 0 > Execute 6 0.00 0.28 0 40 0 > 0 > Fetch 6 0.00 0.02 0 347 0 > 6 > ------- ------ -------- ---------- ---------- ---------- ---------- > ---------- > total 18 0.00 0.32 0 387 0 > 6 > > How do I prevent these hard parses? > Thanks in advance... > -- > View this message in context: > http://www.nabble.com/how-to-prevent-hard-parses-in-oracle-tp15542523p15542523.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > >
