At 5:39 PM -0400 7/16/01, Simon Lee wrote:
>I have a process that will be receiving a bulk of data, say, every 5
>In the program, I can:
>1. Use the "Insert into" command to put the data into the table one at a
> (Drawback: it would be very slow for each query to put in the data). Or
>2. Save the whole data into a file, then use "load data infile".
> (Drawback: put the data in a file, then "load", is one step extra too.)
>Is there a way (or a command) that I can just put the data into the table,
>from the process memory?
You have to use a SQL statement of some kind. You might want to use approach
1, but write a single INSERT statement that loads multiple rows.
INSERT INTO tbl_name (col_names
(values for row 1),
(values for row 2),
(values for row 3),
This is much more efficient than a set of single-row INSERTs.
>You help is appreciated.
>Wide Area Network Design Lab
>732-868-0100 ext 267
Paul DuBois, paul@stripped