fenway Posted January 5, 2012 Share Posted January 5, 2012 well, you don't appear to have a UID on the worldcitylist table... Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1304589 Share on other sites More sharing options...
dflow Posted January 5, 2012 Author Share Posted January 5, 2012 well, you don't appear to have a UID on the worldcitylist table... nope Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1304660 Share on other sites More sharing options...
fenway Posted January 6, 2012 Share Posted January 6, 2012 Then what is unique in that table? Something numeric, perhaps? Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305084 Share on other sites More sharing options...
dflow Posted January 7, 2012 Author Share Posted January 7, 2012 Then what is unique in that table? Something numeric, perhaps? the lat and lng are unique, city names aren't Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305367 Share on other sites More sharing options...
fenway Posted January 8, 2012 Share Posted January 8, 2012 Well, then use something unique for another table, and use BETWEEN. Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305546 Share on other sites More sharing options...
dflow Posted January 8, 2012 Author Share Posted January 8, 2012 Well, then use something unique for another table, and use BETWEEN. i manage to ALTER TABLE worldcitylist ADD id INT NOT NULL AUTO_INCREMENT UNIQUE; then i use your between suggestion thanks Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305549 Share on other sites More sharing options...
fenway Posted January 9, 2012 Share Posted January 9, 2012 So, solved? Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305789 Share on other sites More sharing options...
dflow Posted January 9, 2012 Author Share Posted January 9, 2012 So, solved? yes thanks, marked im running it locally, my mac is handeling it OK , through a GUI terminal, i got server shutdown on my VPS, don't know why, anyways, im doing currently 1 million at a time and i removed a section from the former query UPDATE worldcitylist INNER JOIN worldregionlist as country ON (worldcitylist.countrycode=country.countrycode) SET worldcitylist.country_id = country.country_id WHERE id BETWEEN 1000000 AND 2000000 Quote Link to comment https://forums.phpfreaks.com/topic/253941-help-with-query-millions-of-rows/page/2/#findComment-1305805 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.