in reply to Re: Is bind useful for one-time queries and commands?
in thread Is bind useful for one-time queries and commands?

I'm confused .. your initial statement

contrasts with your closing statement Do you have experience with DB2 and Perl, or is this more of an educated guess?

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

  • Comment on Re^2: Is bind useful for one-time queries and commands?

Replies are listed 'Best First'.
Re^3: Is bind useful for one-time queries and commands?
by ruzam (Curate) on May 20, 2008 at 19:00 UTC
    The DB2 server will execute the bind step internally if it has not already been done by the application. In other words, DB2 will intercept it's own query requests and bind them (temporarily) before actually getting the data. I don't know if or how long DB2 might cache ad hoc query requests, it's probably configurable. A cached query request would effectively eliminate the need for a bind step at all from the application side.

    I have experience with DB2, but not DB2 and Perl. It's an educated guess.

      Update: Sorry -- I did the benchmarks wrong. Please disregard. I have updated the thread in question, in case you are interested in a more up to date benchmark.

      OK -- I've run benchmarks and found that bind doesn't slow things down at all -- my test actually ran faster with bind, which is what I should have expected. Now I'm trying to understand whether the type checking that bind_param does is really useful.

      Alex / talexb / Toronto

      "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds