List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:June 25 2010 7:05pm
Subject:Re: selecting data for computation
View as plain text  
Hi Tim, all!


Tim Gustafson wrote:
> [[...]]
> 
> There is not an index on the work_data column as it's a longblob and I was
> under the impression that indexing a longblob field wasn't helpful.  Maybe
> I should add a work_data_size field as an integer, index that, and search
> for records where work_data_size = 0.

I would add some "status" field with (at least) three values, signifying
"new", "in progress", "done"; and for that I would create an index.

Then, let your application grab a record whose status is "new" and
change that to "in progress", do the computation, and store the result
and set status "done".
If you worry about aborting computations, add some date/time field which
you set when you start the computation, and periodically do a cleanup
searching for "in progress" records which are overdue.

> 
> For what it's worth, the table currently has 800,000 rows in it and is
> likely to expand in the future.

That is my reason for proposing some column which can be indexed.


Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  Joerg.Bruehe@stripped
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028

Thread
selecting data for computationTim Gustafson24 Jun
  • Re: selecting data for computationDan Nelson24 Jun
    • Re: selecting data for computationTim Gustafson25 Jun
      • Re: selecting data for computationTim Gustafson25 Jun
        • Re: selecting data for computationDan Nelson25 Jun
          • Re: selecting data for computationTim Gustafson26 Jun
            • Re: selecting data for computationBaron Schwartz28 Jun
              • Re: selecting data for computationTim Gustafson1 Jul
      • Re: selecting data for computationJoerg Bruehe25 Jun