From: Peter Brawley Date: January 15 2010 7:00am Subject: Re: Better that `NOT IN` List-Archive: http://lists.mysql.com/mysql/220255 Message-Id: <4B50127A.4080204@earthlink.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------030100080504030101070909" --------------030100080504030101070909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit For alternatives, have a look at "The unbearable slowness of IN()" at http://www.artfulsoftware.com/queries.php. PB ----- Junior Ortis wrote: > Hi guys i have a problem, 3 big tables: item_instance about 15KK rows, > character_inventory 15KK rows, guild_bank_item 2KK rows. > > And i need i clean on item_instance how this query: > > DELETE FROM `item_instance` WHERE guid NOT IN(SELECT item FROM > `character_inventory`) AND guid NOT IN(SELECT item_guid FROM > `guild_bank_item`) AND > guid NOT IN(SELECT item_guid FROM `mail_items`) and guid NOT IN(SELECT > itemguid FROM `auctionhouse`); > > Well atm is running about 13 hours, State = Sending Data. > > I will be a better option ? > > Thanks all ! > > > ------------------------------------------------------------------------ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 8.5.432 / Virus Database: 270.14.139/2620 - Release Date: 01/14/10 07:35:00 > > --------------030100080504030101070909--