MySQL Forums :: Newbie :: update big table cause an excution time out


Advanced Search

update big table cause an excution time out
Posted by: lamis beirkdar ()
Date: February 28, 2010 09:01AM

I have two table first (countries) one is like this with over 90k recored
fromip 		toip 	      twocode 	fullcode
16777216 	16777471 	AU 	AUSTRALIA
16777472 	16843007 	- 	-
16843008 	16843263 	AU 	AUSTRALIA
20054016 	20055039 	AU 	AUSTRALIA
20055040 	33488895 	- 	-
33488896 	33554431 	AU 	AUSTRALIA
33554432 	33686271 	UK 	UNITED KINGDOM
33686272 	50331647 	- 	-

and the second table is (referrer) with 100k recored and empty country feild
id 	ip                   country
1 	188.49.83.229
2 	41.226.108.77
3 	86.108.51.36
4 	41.129.10.205
5 	41.238.147.221
6 	213.186.175.39
what I want is to run this query
update `referrer` as a set a.country = (select twocode from country as b where INET_ATON(a.ip) between b.fromip and b.toip ) WHERE a.ip is not null

Now when I try to run this, the whole site freeze, any idea what can I do? thanks alot in advance



Edited 1 time(s). Last edit at 02/28/2010 09:09AM by lamis beirkdar.

Options: ReplyQuote


Subject Written By Posted
update big table cause an excution time out lamis beirkdar 02/28/2010 09:01AM
Re: update big table cause an excution time out Rick James 03/01/2010 02:30PM
Re: update big table cause an excution time out lamis beirkdar 03/10/2010 06:44PM
Re: update big table cause an excution time out Guelphdad Lake 03/10/2010 08:12PM
Re: update big table cause an excution time out lamis beirkdar 03/11/2010 01:25AM
Re: update big table cause an excution time out Rick James 03/11/2010 08:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.