Jackson Miller wrote: > I need to have a web application be able to import large amounts of > data (400,000 rows of 10 columns). I know how to script it and have > it running in the background. However I want to know how I can > optimize my insert statements to try to speed things up. For extreme speed http://www.mysql.com/doc/en/LOAD_DATA.html Be aware of some sharp edges with replication or foreign keys.
> Will it help if I insert multiple rows at a time? If so, is there a > magic number or range? > The same would also go for updates. Depending on your exact needs, consider brutal overwrites: LOAD DATA CONCURRENT INFILE '...' REPLACE INTO TABLE Replaces 10000 rows within 3.5 s into Innodb running MySQL-max-4.10 and WinXP on Celeron /400MHz/ for me. HansH -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]