ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: why does SqlMap ibatis is slower that JdbcDaoTemplate
Date Mon, 10 Oct 2005 21:47:12 GMT
Ooops.....Sven, that is incorrect.

Whether you use #inline# parameters or explicit parameter markers (?),
iBATIS will always use prepared statements with parameter markers. iBATIS
NEVER uses hardcoded arguments unless you use string substitution using the
$ syntax.

Cheers,
Clinton

On 10/10/05, Castillo, Jose Rodrigo (LanInfo) <jcastillo@lancargo.com>
wrote:
>
> Hi Sven:
>
> How can i use paramaters markets with ibatis?
>
> Thank you very much for your good explication!!!
>
> Regards,
> Rodrigo
>
> "Sven Boden" <list123@pandora.be> wrote in message
> news:<h47bk1hem9t6irpgc4rq8ipph6h1893t2t@4ax.com>...
>
> Simple... the SQL code executed by the JDBC example and the iBATIS
> version is not the same. The JDBC examples use parameter markers and
> proper arguments, while the iBATIS version in the original mail uses
> inline parameters, the #value# (which means that the SQL generated
> will contain hardcoded parameters)... By the way iBATIS can also use
> parameters markers.
>
> Oracle performance suffers very badly when using hardcoded arguments.
> I could make my own example but have a look e.g. at Tom Kyte's site
> http://asktom.oracle.com and search for "hard parsing"... you will get
> a complete explanation why hardcoding is bad.
>
> Personally I've seen in Oracle examples of executing SQL in a loop
> with different arguments where with proper parameters the code would
> take 2 seconds, and with harcoded arguments the "same" SQL took 2
> minutes.
>
> So if the database is Oracle a more proper comparison would be to
> hardcode the arguments in the JDBC example, or use parameter markers
> in iBATIS.
>
> Regards,
> Sven
>
>
> On Thu, 06 Oct 2005 23:45:41 +0200, you wrote:
>
> >Hi Sven,
> >
> >Like to hear from you, how you came to that conclusion.
> >
> >-J
> >
>
>
> ----------
>

Mime
View raw message