Thomas, Well I guess the best way is to make an insert statement that goes like,
INSERT INTO table values (3,'S',1,6,'2002-07-15','The Palm Computing Device',1),(2,'S',6,6,'2002-07-18','Programming for the Palm',1),(4,'S',5,6,'2002-07-1 6','Medical Applications for the Palm Device',1); The above query will connect once and insert all 3 records, The method is called extended insert, and is a much faster method of insert based on the mysqldump man pages when restoring data back to the database. I use --extended-insert in my sql dumps. am not sure if LOAD DATA INFILE is much faster, well on raw data i guess it is. Respectfully yours, Sherwin T. Ang Systems Administrator Tridel Technologies Incorporated http://www.tridel.net ----- Original Message ----- From: "Thomas Spahni" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 28, 2003 8:37 PM Subject: speeding up mysql client > Hi everyone, > > I'm calling the mysql client from a bash shell script in a loop. It's > doing one INSERT query each time. > > I'm aware that there is some overhead in this procedure, because the > client has to connect to the server each time. > > Question: what are the recommended options to make this as fast as > possible? I'm already using --disable-auto-rehash, but what other > options could help? > > Thomas Spahni > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php