ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thijs <vonk.th...@gmail.com>
Subject how to prevent hard parses in oracle
Date Mon, 18 Feb 2008 10:48:53 GMT

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.


Mime
View raw message