Hacker News new | ask | show | jobs
by andrewstuart 1002 days ago
Partial indexes might help.
2 comments

Also: an ordered index that matches the ordering clause in your job-grabbing query. This is useful if you have lots of pending jobs.
Exactly. A partial index should make things fly here.