From: Brett Error Date: March 11 1999 9:40pm Subject: RE: Splitting query results among machines? List-Archive: http://lists.mysql.com/mysql/54 Message-Id: <00ad01be6c07$d83ba130$0101000a@brette.superstats.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I would add a field that includes a random number between, say 1 and 100. If you add this number at insert time, you can then easily spilt between machines by selecting against this field: Machine 1: field between 1 and 33 Machine 2: field between 34 and 66 Machine 3: field between 67 and 100 Later if you need to further split the load among even more machines you can easily do it by redistributing the range that each machine selects. ______________________ Brett Error SuperStats.com Free Visitor Statistics for your Website http://www.superstats.com > -----Original Message----- > From: Brian Bray [mailto:bbray@stripped] > Sent: Thursday, March 11, 1999 2:21 PM > To: mysql@stripped > Subject: Splitting query results among machines? > > > > > I am working on upgrading a program for a website I operate > (www.BookmarkTracker.com) which goes through a table of URL's and checks > each site for updates. My program is currently multi-threaded so it can > check many websites simultaniously however I'm fast outgrowing even the > multi-threaded model and I need to start using multiple machines to do the > work. > > My question is how do I run a query and then reliably split the results of > the query among multiple machines. Say for example I do a SELECT * FROM > Bookmarks. I want machine 1 to handle the first 1/3 of the > resulting rows, machine 2 the 2nd 1/3 and so on. > > Any good Idea's? > > Thanks in advance, > > __Brian Bray______________________________________ > - Webmaster : http://www.BookmarkTracker.com - > - Email : webmaster@stripped - > > > > --------------------------------------------------------------------- > To request this thread, e-mail mysql-thread50@stripped > > To unsubscribe, e-mail the address in the List-Unsubscribe header. > For additional commands, e-mail: mysql-help@stripped >