From: Martin Gainty Date: September 26 2008 12:11am Subject: RE: Help! List-Archive: http://lists.mysql.com/mysql/214661 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_0490ca8a-6056-4f88-9fc0-3670a7dad104_" --_0490ca8a-6056-4f88-9fc0-3670a7dad104_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 2 items I would increase bump key_buffer_size as suggested here http://dev.mysql.com/doc/refman/5.1/en/delete-speed.html also TRUNCATE instead of DELETE where TRANSACTION is not active Martin=20 ______________________________________________=20 Disclaimer and confidentiality note=20 Everything in this e-mail and any attachments relates to the official busin= ess of Sender. This transmission is of a confidential nature and Sender doe= s not endorse distribution to any party other than intended recipient. Send= er does not necessarily endorse content contained within this transmission.= =20 > Date: Thu=2C 25 Sep 2008 15:45:00 -0700 > From: andrewmchorney@stripped > To: gpeel@stripped=3B mysql@stripped > Subject: Re: Help! >=20 > Hello >=20 > I would not recommend delete massive numbers of records in a single sql s= tatement. I have had problems doing this on a system with few records (1.7 = million) and doing a delete with a condition clause of "where 1 =3D 1". Th= e server had problems with this.=20 >=20 > The MySQL server is probably building some rollback code in case somethin= g goes wrong. If it succeeds it will be a good amount of time. I would reco= mmend doing several small deletes. >=20 > Andrew >=20 >=20 >=20 > ---- Grant Peel wrote:=20 > > Hi all=2C > >=20 > > I have a table I needed to prune because it had grown to 5 million rows= and > > it appeared that that app that uses it couldnt anymore. > >=20 > > I am in the process of: > >=20 > > DELETE FROM mytable WHERE id < 3000000=3B > >=20 > > the above has been running for close than an hour and I am starting to = get a > > little nervous. > >=20 > > it is on freebsd 6.3=2C mysql 4.x on a Single core dell 2.8 GHx I think= . > >=20 > > I have shut down all process but necessary one so mysql has full access= to > > the cpu. > >=20 > > Should I be worried? Is there anything I can do to speed this up? > >=20 > > -G > >=20 > >=20 > >=20 > > --=20 > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dandrewmchorney@= cox.net > >=20 >=20 >=20 > --=20 > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dmgainty@stripped= om >=20 _________________________________________________________________ See how Windows connects the people=2C information=2C and fun that are part= of your life. http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/= --_0490ca8a-6056-4f88-9fc0-3670a7dad104_--