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.bru...@sun.com
Sun Microsystems GmbH,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to