in reply to Re: Re: Batch DB query -- implementation?
in thread Batch DB query -- implementation?

Are you using bind variables? I believe that will reduce the amount of data sent over the network.
  • Comment on Re: Re: Re: Batch DB query -- implementation?

Replies are listed 'Best First'.
Re: Re: Re: Re: Batch DB query -- implementation?
by zaimoni (Beadle) on Jul 03, 2002 at 16:07 UTC
    Bind variables:
    Sorry, my terminology is weak here: I wouldn't know whether I was using bind variables even if I was. What I know is that I'm currently using '?' as a place holder so that I don't have to think about properly escaping the data. My current paradigm is:
    my $sth = $dbh->prepare($query) $sth->execute(@parameterlist)
    (use looping as convenient).
      That's correct, you are using bind variables.

      Another way to do it, if you really find that network is killing you, is to use whatever batch loader your database provides and just have perl generate the correct file format to feed it.