You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Mark Volkmann <ma...@ociweb.com> on 2007/02/22 18:47:39 UTC
parameters in select statements and performance
Just checking my understanding ... Is it the case that select
statements that use # placeholders perform better than those using $
placeholders when executed multiple times? Is this because the
compiled query is saved by the database so it can be reused later
with different parameter values when # placeholders are used, but not
when $ placeholders are used?
Re: parameters in select statements and performance
Posted by Larry Meadors <lm...@apache.org>.
Yes, almost all databases will cache the execution plans for queries
with ? in them.
Some will also try to do the same with values in them, too, but that
is not as common.
Larry
On 2/22/07, Mark Volkmann <ma...@ociweb.com> wrote:
> Just checking my understanding ... Is it the case that select
> statements that use # placeholders perform better than those using $
> placeholders when executed multiple times? Is this because the
> compiled query is saved by the database so it can be reused later
> with different parameter values when # placeholders are used, but not
> when $ placeholders are used?
>