MySQL Forums
Forum List  »  Newbie

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
what I want is to run this query
update `referrer` as a set = (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

Written By
update big table cause an excution time out
February 28, 2010 09:01AM

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.