ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@freenet.de
Subject Example Performance best practise
Date Mon, 02 Jul 2007 13:40:53 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//DE"><HTML><HEAD><META
HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><TITLE>Message</TITLE></HEAD><BODY>After
finding the *Examples-Criteria a very nice feature,&nbsp; but thinking now about performance:<br><br>List
find(String likename)<br>{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; EmployeeExample example = new EmployeeExample();<br>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; example.createCriteria()<br>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; .andNameLike( likename
);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; ...and maybe more criterias<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
....<br>}<br><br><br>Question I think about:<br>Is that a approbiate
way&nbsp; if this gets always constructed new especially if often called. <br>Couldnt
that not be done better or should I then use better a manual SQLMap config instead ?  <br>(Maybe
it is the same as with a PreparedStatement&nbsp; setting the "?"-Parameters,&nbsp;
<br>&nbsp;but think that a preparedStatement or whatever is a step afterwards constructing
the criteria, <br>so question remains)<br><br>This can maybe also be seen
as a general question,&nbsp; how performance is best practised with iBatis.<br>I
think generation of new objects should be kept as minimal as possible.<br>(Is there
a benchmark&nbsp; compared to jdbc, hibernate,...&nbsp; available)<br><br><br>


<br>--<br><!-- AdSpace freenet EMO Webmail Banner --> 
<a href="http://adserver.freenet.de/click.ng/site=fn&prod=chetools&kat=rub&tbl=webmail&ppos=14&TransactionID=1183383653577075&rgtg=256"
target="_blank"><img src="http://adserver.freenet.de/image.ng/site=fn&prod=chetools&kat=rub&tbl=webmail&ppos=14&TransactionID=1183383653577075&rgtg=256"
border="0"></a><!-- / AdSpace -->
</BODY></HTML>
Mime
View raw message