|
Posted by wizofaus on 01/11/07 11:47
Uri Dimant wrote:
> > In the end I ended up de-parameterizing the query just for this case,
> > but now I'm worried - how can I be sure that my other queries won't
> > suffer from the same problem? Should I never use parameters because of
> > this possibility?
> >
> An ability using parameters is very powerful , don't afraid using parameters
> , just test it carefuly
>
Sure, except that the content of the database is out of my control -
this particular scenario (where nearly all the records matched a
particular key, but the query was first run against a different key)
could easily arrise in a production environment. More to the point,
I've seen no evidence that I'm getting any performance benefits from
using parameterized queries.
I suspect I will at least add a configuration option to avoid
parameterized queries (relatively straightforward, as I have a layer of
code that handles query parameters) if I see a problem like this again.
Navigation:
[Reply to this message]
|