List:General Discussion« Previous MessageNext Message »
From:Brett Error Date:March 11 1999 9:40pm
Subject:RE: Splitting query results among machines?
View as plain text  
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
>

Thread
sort of defragmentation?Mike Otto11 Mar
  • Re: sort of defragmentation?kalle volkov11 Mar
  • Re: sort of defragmentation?Christian Mack11 Mar
    • Re: sort of defragmentation?Charles Kirby11 Mar
      • Re: sort of defragmentation?Sasha Pachev11 Mar
        • Re: sort of defragmentation?Charles Kirby11 Mar
          • Re: sort of defragmentation?Sasha Pachev11 Mar
            • Re: sort of defragmentation?Charles Kirby11 Mar
              • Splitting query results among machines?Brian Bray11 Mar
                • RE: Splitting query results among machines?Brett Error11 Mar
  • SIGSEV using Mysql++Sander Pilon26 Aug
Re: sort of defragmentation?Ed Carp11 Mar
  • Re: sort of defragmentation?Sasha Pachev11 Mar
Re: sort of defragmentation?Ed Carp11 Mar
  • Re: sort of defragmentation?Christian Mack12 Mar
Re: Splitting query results among machines?Fred Lindberg11 Mar
Re: sort of defragmentation?Ed Carp12 Mar
Re: sort of defragmentation?Christian Mack13 Mar
Re: sort of defragmentation?Ed Carp13 Mar