Re: Best MySQL schema for storing image processing jobs?
Hello Moez
I'd go with one jobs table, not separate tables per stage. Just add a status column (uploaded/queued/processing/completed/failed) plus a timestamp for each transition like queued_at, processed_at etc. Splitting into tables per stage sounds clean at first but it's a pain in practice, you end up moving rows around on every status change and querying "what's stuck in processing" turns into a UNION instead of a simple WHERE.
Do keep results separate though, a job_results table with job_id as FK, output path, dimensions, format etc. Jobs can have zero or multiple outputs (thumbnails, different sizes) so keeping that out of the jobs table keeps things clean.
Couple small tips: index status + created_at together since your worker's gonna constantly query for queued jobs in order, and add a retry_count column if failures need retrying, saves you building a whole separate failures table for that.
This setup's basically the go to for any job queue kind of workflow honestly, works fine whether you're polling with cron or using a proper queue.
Regards,
Herrick
DevOps Engineer
Accuweb.cloud
Subject
Written By
Posted
Re: Best MySQL schema for storing image processing jobs?
August 21, 2026 02:51AM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.