in reply to Re: Quickest way to insert many rows with DBI
in thread Quickest way to insert many rows with DBI

Are you suggesting I write out the data to a flat file first, then use the copy command to populate the table?
  • Comment on Re^2: Quickest way to insert many rows with DBI

Replies are listed 'Best First'.
Re^3: Quickest way to insert many rows with DBI
by rinceWind (Monsignor) on Apr 11, 2006 at 09:57 UTC

    I think that's what holli has in mind. You could use a piped open (or open2 or open3) to write to your copy command's stdin.

    Update: Looks like borisz has a better idea with DBD::Pg's COPY support.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)