in reply to Re: Re: Re: using sequences with dbi
in thread using sequences with dbi

Because, at the very least, if you run the same program with different parameters, then multiple statements are sent to the server, with different text. This means they have to be reparsed.

If you use placeholders, then, irrespective of the number of times the statement is executed, the database only ever gets one version of it, but with different parameters. So there's only one parse (which is both faster and more memory efficient for the server).

  • Comment on Re: Re: Re: Re: using sequences with dbi

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: using sequences with dbi
by trantor (Chaplain) on Oct 04, 2001 at 14:16 UTC

    I think the poster wanted to stress the fact that placehodlers automagically quote the value. If you don't use them (which sounds perfectly fine to me in the conditions you mentioned) you should at least use the quote() method to prevent havoc when an interpolated value contains potentially dangerous characters such as single quotes.

    -- TMTOWTDI