6 lines
205 B
SQL
6 lines
205 B
SQL
DROP INDEX IF EXISTS ai_jobs_pending_claim_idx;
|
|
|
|
CREATE INDEX IF NOT EXISTS ai_jobs_pending_claim_idx
|
|
ON ai_jobs (status, priority DESC, scheduled_at ASC, created_at ASC)
|
|
WHERE status = 'pending';
|