3 ms·Partial indexes might help.by andrewstuart 3y agoPartial indexes might help.emilsedgh 3y agoExactly. A partial index should make things fly here.runeks 3y agoAlso: an ordered index that matches the ordering clause in your job-grabbing query. This is useful if you have lots of pending jobs.