6 lines
207 B
SQL
6 lines
207 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 DESC, created_at DESC)
|
|
WHERE status = 'pending';
|